Scenario #9999: Generate Demo Dataset

Create the mandant person Hostsharing eG

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Hostsharing eG"
}
EOF
=> status: 201 CREATED 1d707824-40cd-4f50-b7ac-96e311d8281c

Creating accounts needs an acting global-admin USER subject, but that subject does not need to have an own account (and thus a person) itself. Here, such a subject gets created: it is synchronized from Keycloak, and the global ADMIN role is granted to it, but no account is created for it.

Properties

Given

name value
subjectUuid de300000-0000-0000-0000-000000000001
subjectName hsh-demo_admin

Synchronize the new USER Subject from Keycloak

HTTP PUT "/api/rbac/subjects/de300000-0000-0000-0000-000000000001" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "name" : "hsh-demo_admin",
  "type" : "USER"
}
EOF
=> status: 201 CREATED de300000-0000-0000-0000-000000000001

This is what the Keycloak sync program does for each new Keycloak user.

Prerequisite: Resolve the UUID of the global ADMIN role

The grant API needs the UUID of the role which we want to grant.

HTTP GET "/api/rbac/roles?name=rbac.global%23global%3AADMIN" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "4049b3a1-164d-484c-bae7-b53587f25a60",
  "object.uuid" : "bdff7d27-a663-4c20-bd9b-e863804df2f2",
  "objectTable" : "rbac.global",
  "objectIdName" : "global",
  "roleType" : "ADMIN",
  "roleName" : "rbac.global#bdff7d27-a663-4c20-bd9b-e863804df2f2:ADMIN",
  "roleIdName" : "rbac.global#global:ADMIN"
} ]

Grant the global ADMIN role to the new USER Subject

HTTP POST "/api/rbac/grants" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  -H 'Hostsharing-Assumed-Roles: rbac.global#global:ADMIN' \
  <<EOF
{
  "assumed" : true,
  "grantedRole.uuid" : "4049b3a1-164d-484c-bae7-b53587f25a60", // globalAdminRoleUuidToGrant
  "granteeSubject.uuid" : "de300000-0000-0000-0000-000000000001"
}
EOF
=> status: 201 CREATED 4049b3a1-164d-484c-bae7-b53587f25a60 // globalAdminRoleUuidToGrant

Verify the new global-admin Subject does not have an own Account

HTTP GET "/api/hs/accounts/current" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-demo_admin>"` \
  `# }`
=> status: 200 OK 
{
  "subject" : {
    "uuid" : "de300000-0000-0000-0000-000000000001",
    "name" : "hsh-demo_admin",
    "organization" : "hsh",
    "type" : "USER"
  },
  "person" : null,
  "globalAdmin" : true
}

UseCase Create Partner => Partner: P-90000 - Tannenhof Bürotechnik eG

Properties

Given

name value
partnerNumber P-90000
personType LEGAL_PERSON
contactCaption Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)
postalAddress         “street”: “Am Anger 167”,
        “zipcode”: “86150”,
        “city”: “Augsburg”,
        “country”: “Germany”
officePhoneNumber +49 171 3920080
emailAddress info@tannenhof-buerotechnik-eg.example.org
tradeName Tannenhof Bürotechnik eG
registrationOffice Registergericht Augsburg
registrationNumber 555465

Person: Hostsharing eG

HTTP GET "/api/hs/office/persons?name=Hostsharing+eG" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c",
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Hostsharing eG",
  "salutation" : null,
  "title" : null,
  "givenName" : null,
  "familyName" : null
} ]

Even in production data we expect this query to return just a single result.

Person: Tannenhof Bürotechnik eG

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Tannenhof Bürotechnik eG"
}
EOF
=> status: 201 CREATED c1cd904f-4807-4a4b-8b80-24b1af0c2cfe

Contact: Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)",
  "postalAddress" : {
    "street" : "Am Anger 167",
    "zipcode" : "86150",
    "city" : "Augsburg",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 171 3920080"
  },
  "emailAddresses" : {
    "main" : "info@tannenhof-buerotechnik-eg.example.org"
  }
}
EOF
=> status: 201 CREATED 4e027986-5258-42bb-8776-b159ddc7d0f9

Create Partner: P-90000 - Tannenhof Bürotechnik eG

HTTP POST "/api/hs/office/partners" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "partnerNumber" : "P-90000",
  "partnerRel" : {
    "anchor.uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
    "holder.uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "contact.uuid" : "4e027986-5258-42bb-8776-b159ddc7d0f9" // Contact: Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)
  },
  "details" : {
    "registrationOffice" : "Registergericht Augsburg",
    "registrationNumber" : "555465"
  }
}
EOF
=> status: 201 CREATED bcac06d7-d899-4628-a254-d6c2af47e64f

Verify the New Partner Relation

HTTP GET "/api/hs/office/relations?relationType=PARTNER&contactData=Tannenhof+B%C3%BCrotechnik+eG+-+Hauptkontakt+%28P-90000%29" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "43a30219-55a6-4ebf-9f4b-03f112871878",
  "anchor" : {
    "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Tannenhof Bürotechnik eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "4e027986-5258-42bb-8776-b159ddc7d0f9", // Contact: Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)
    "caption" : "Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)",
    "postalAddress" : {
      "zipcode" : "86150",
      "country" : "Germany",
      "city" : "Augsburg",
      "street" : "Am Anger 167"
    },
    "emailAddresses" : {
      "main" : "info@tannenhof-buerotechnik-eg.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 171 3920080"
    }
  }
} ]

UseCase Add Demo Relation => REPRESENTATIVE: Torsten Schneider - Vertretung (P-90000)

Properties

Given

name value
partnerPersonName Tannenhof Bürotechnik eG
relationType REPRESENTATIVE
holderGivenName Torsten
holderFamilyName Schneider
contactCaption Torsten Schneider - Vertretung (P-90000)
postalAddress “name”: “Geschäftsführung”,
        “street”: “Wiesengrund 246”,
        “zipcode”: “50667”,
        “city”: “Köln”,
        “country”: “Germany”
phoneNumber +49 221 4710870
emailAddress torsten-schneider@tannenhof-buerotechnik-eg.example.org

Person: Torsten Schneider

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Schneider",
  "givenName" : "Torsten"
}
EOF
=> status: 201 CREATED 645d0851-7a68-4871-b34a-820a9da2423e

Contact: Torsten Schneider - Vertretung (P-90000)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Torsten Schneider - Vertretung (P-90000)",
  "postalAddress" : {
    "name" : "Geschäftsführung",
    "street" : "Wiesengrund 246",
    "zipcode" : "50667",
    "city" : "Köln",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 221 4710870"
  },
  "emailAddresses" : {
    "main" : "torsten-schneider@tannenhof-buerotechnik-eg.example.org"
  }
}
EOF
=> status: 201 CREATED 2ef782c5-934a-485e-87bd-3145d32fce22

Create REPRESENTATIVE: Torsten Schneider - Vertretung (P-90000)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "REPRESENTATIVE",
  "anchor.uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
  "holder.uuid" : "645d0851-7a68-4871-b34a-820a9da2423e", // Person: Torsten Schneider
  "contact.uuid" : "2ef782c5-934a-485e-87bd-3145d32fce22" // Contact: Torsten Schneider - Vertretung (P-90000)
}
EOF
=> status: 201 CREATED 05215733-617e-409b-b883-4162f1e813de

Verify the Relation Got Created

HTTP GET "/api/hs/office/relations/05215733-617e-409b-b883-4162f1e813de" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "05215733-617e-409b-b883-4162f1e813de",
  "anchor" : {
    "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Tannenhof Bürotechnik eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "645d0851-7a68-4871-b34a-820a9da2423e", // Person: Torsten Schneider
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Torsten",
    "familyName" : "Schneider"
  },
  "type" : "REPRESENTATIVE",
  "mark" : null,
  "contact" : {
    "uuid" : "2ef782c5-934a-485e-87bd-3145d32fce22", // Contact: Torsten Schneider - Vertretung (P-90000)
    "caption" : "Torsten Schneider - Vertretung (P-90000)",
    "postalAddress" : {
      "zipcode" : "50667",
      "country" : "Germany",
      "city" : "Köln",
      "street" : "Wiesengrund 246",
      "name" : "Geschäftsführung"
    },
    "emailAddresses" : {
      "main" : "torsten-schneider@tannenhof-buerotechnik-eg.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 221 4710870"
    }
  }
}

UseCase Add Demo Relation => REPRESENTATIVE: Susanne Weber - Vertretung (P-90000)

Properties

Given

name value
partnerPersonName Tannenhof Bürotechnik eG
relationType REPRESENTATIVE
holderGivenName Susanne
holderFamilyName Weber
contactCaption Susanne Weber - Vertretung (P-90000)
postalAddress         “street”: “Ulmenstraße 729”,
        “zipcode”: “44135”,
        “city”: “Dortmund”,
        “country”: “Germany”
phoneNumber +49 171 3920066
emailAddress susanne-weber@tannenhof-buerotechnik-eg.example.org

Person: Susanne Weber

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Weber",
  "givenName" : "Susanne"
}
EOF
=> status: 201 CREATED 261b5baa-5c86-474f-ac46-8ab62a80130d

Contact: Susanne Weber - Vertretung (P-90000)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Susanne Weber - Vertretung (P-90000)",
  "postalAddress" : {
    "street" : "Ulmenstraße 729",
    "zipcode" : "44135",
    "city" : "Dortmund",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 171 3920066"
  },
  "emailAddresses" : {
    "main" : "susanne-weber@tannenhof-buerotechnik-eg.example.org"
  }
}
EOF
=> status: 201 CREATED a59a7373-d983-42a4-82bf-56cd683d93b4

Create REPRESENTATIVE: Susanne Weber - Vertretung (P-90000)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "REPRESENTATIVE",
  "anchor.uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
  "holder.uuid" : "261b5baa-5c86-474f-ac46-8ab62a80130d", // Person: Susanne Weber
  "contact.uuid" : "a59a7373-d983-42a4-82bf-56cd683d93b4" // Contact: Susanne Weber - Vertretung (P-90000)
}
EOF
=> status: 201 CREATED 174b9816-92a7-4dc6-8ee2-875399026e5a

Verify the Relation Got Created

HTTP GET "/api/hs/office/relations/174b9816-92a7-4dc6-8ee2-875399026e5a" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "174b9816-92a7-4dc6-8ee2-875399026e5a",
  "anchor" : {
    "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Tannenhof Bürotechnik eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "261b5baa-5c86-474f-ac46-8ab62a80130d", // Person: Susanne Weber
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Susanne",
    "familyName" : "Weber"
  },
  "type" : "REPRESENTATIVE",
  "mark" : null,
  "contact" : {
    "uuid" : "a59a7373-d983-42a4-82bf-56cd683d93b4", // Contact: Susanne Weber - Vertretung (P-90000)
    "caption" : "Susanne Weber - Vertretung (P-90000)",
    "postalAddress" : {
      "zipcode" : "44135",
      "country" : "Germany",
      "city" : "Dortmund",
      "street" : "Ulmenstraße 729"
    },
    "emailAddresses" : {
      "main" : "susanne-weber@tannenhof-buerotechnik-eg.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 171 3920066"
    }
  }
}

UseCase Add Demo Relation => REPRESENTATIVE: Claudia Großbaum - Vertretung (P-90000)

Properties

Given

name value
partnerPersonName Tannenhof Bürotechnik eG
relationType REPRESENTATIVE
holderGivenName Claudia
holderFamilyName Großbaum
contactCaption Claudia Großbaum - Vertretung (P-90000)
postalAddress         “street”: “Am Anger 731”,
        “zipcode”: “20095”,
        “city”: “Hamburg”,
        “country”: “Germany”
phoneNumber +49 40 66969668
emailAddress claudia-grossbaum@tannenhof-buerotechnik-eg.example.org

Person: Claudia Großbaum

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Großbaum",
  "givenName" : "Claudia"
}
EOF
=> status: 201 CREATED 1f0d4b4d-68ef-48f2-9b63-9d5ed18b00a4

Contact: Claudia Großbaum - Vertretung (P-90000)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Claudia Großbaum - Vertretung (P-90000)",
  "postalAddress" : {
    "street" : "Am Anger 731",
    "zipcode" : "20095",
    "city" : "Hamburg",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 40 66969668"
  },
  "emailAddresses" : {
    "main" : "claudia-grossbaum@tannenhof-buerotechnik-eg.example.org"
  }
}
EOF
=> status: 201 CREATED 9099301e-a91f-4a44-bf1d-aca17b642ea1

Create REPRESENTATIVE: Claudia Großbaum - Vertretung (P-90000)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "REPRESENTATIVE",
  "anchor.uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
  "holder.uuid" : "1f0d4b4d-68ef-48f2-9b63-9d5ed18b00a4", // Person: Claudia Großbaum
  "contact.uuid" : "9099301e-a91f-4a44-bf1d-aca17b642ea1" // Contact: Claudia Großbaum - Vertretung (P-90000)
}
EOF
=> status: 201 CREATED 6692b58b-69ff-4ae2-b29d-8aa97d198193

Verify the Relation Got Created

HTTP GET "/api/hs/office/relations/6692b58b-69ff-4ae2-b29d-8aa97d198193" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "6692b58b-69ff-4ae2-b29d-8aa97d198193",
  "anchor" : {
    "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Tannenhof Bürotechnik eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "1f0d4b4d-68ef-48f2-9b63-9d5ed18b00a4", // Person: Claudia Großbaum
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Claudia",
    "familyName" : "Großbaum"
  },
  "type" : "REPRESENTATIVE",
  "mark" : null,
  "contact" : {
    "uuid" : "9099301e-a91f-4a44-bf1d-aca17b642ea1", // Contact: Claudia Großbaum - Vertretung (P-90000)
    "caption" : "Claudia Großbaum - Vertretung (P-90000)",
    "postalAddress" : {
      "zipcode" : "20095",
      "country" : "Germany",
      "city" : "Hamburg",
      "street" : "Am Anger 731"
    },
    "emailAddresses" : {
      "main" : "claudia-grossbaum@tannenhof-buerotechnik-eg.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 40 66969668"
    }
  }
}

UseCase Create Demo Debitor => Debitor: Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)

Properties

Given

name value
partnerPersonName Tannenhof Bürotechnik eG
debitorNumberSuffix 00
billable true
vatBusiness true
defaultPrefix aaa
bankAccountHolder Tannenhof Bürotechnik eG (P-90000/0)
iban DE15990200000838881174
bic DEMVDEH0
billingContactCaption Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)
billingContactEmailAddress rechnung0@tannenhof-buerotechnik-eg.example.org

BankAccount: Tannenhof Bürotechnik eG (P-90000/0)

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "holder" : "Tannenhof Bürotechnik eG (P-90000/0)",
  "iban" : "DE15990200000838881174",
  "bic" : "DEMVDEH0"
}
EOF
=> status: 201 CREATED 2fe60fa0-5012-4678-83e1-c09c10dbdd1c

Contact: Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)",
  "emailAddresses" : {
    "main" : "rechnung0@tannenhof-buerotechnik-eg.example.org"
  }
}
EOF
=> status: 201 CREATED 12ff6ac0-98f7-4a21-b9fb-ed8b2b1fb9f9

Create Debitor: Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)

HTTP POST "/api/hs/office/debitors" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "debitorRel" : {
    "anchor.uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "holder.uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "contact.uuid" : "12ff6ac0-98f7-4a21-b9fb-ed8b2b1fb9f9" // Contact: Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)
  },
  "debitorNumberSuffix" : "00",
  "billable" : true,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount.uuid" : "2fe60fa0-5012-4678-83e1-c09c10dbdd1c", // BankAccount: Tannenhof Bürotechnik eG (P-90000/0)
  "defaultPrefix" : "aaa"
}
EOF
=> status: 201 CREATED 7f81418c-72c4-4314-98c8-0a53a7b8e7a3

Verify the Debitor Got Created

HTTP GET "/api/hs/office/debitors/7f81418c-72c4-4314-98c8-0a53a7b8e7a3" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "7f81418c-72c4-4314-98c8-0a53a7b8e7a3",
  "debitorRel" : {
    "uuid" : "ecc0c23f-c5b0-4174-8dfb-004799f5220a",
    "anchor" : {
      "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Tannenhof Bürotechnik eG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Tannenhof Bürotechnik eG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "12ff6ac0-98f7-4a21-b9fb-ed8b2b1fb9f9", // Contact: Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)
      "caption" : "Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "rechnung0@tannenhof-buerotechnik-eg.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-9000000",
  "debitorNumberSuffix" : "00",
  "partner" : {
    "uuid" : "bcac06d7-d899-4628-a254-d6c2af47e64f",
    "partnerNumber" : "P-90000",
    "partnerRel" : {
      "uuid" : "43a30219-55a6-4ebf-9f4b-03f112871878",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Tannenhof Bürotechnik eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "4e027986-5258-42bb-8776-b159ddc7d0f9", // Contact: Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)
        "caption" : "Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)",
        "postalAddress" : {
          "zipcode" : "86150",
          "country" : "Germany",
          "city" : "Augsburg",
          "street" : "Am Anger 167"
        },
        "emailAddresses" : {
          "main" : "info@tannenhof-buerotechnik-eg.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920080"
        }
      }
    },
    "details" : {
      "uuid" : "7d553ca2-f947-4a3a-a6a7-4e885a4efaaa",
      "registrationOffice" : "Registergericht Augsburg",
      "registrationNumber" : "555465",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : null,
  "vatCountryCode" : null,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "2fe60fa0-5012-4678-83e1-c09c10dbdd1c", // BankAccount: Tannenhof Bürotechnik eG (P-90000/0)
    "holder" : "Tannenhof Bürotechnik eG (P-90000/0)",
    "iban" : "DE15990200000838881174",
    "bic" : "DEMVDEH0"
  },
  "defaultPrefix" : "aaa"
}

UseCase Create Demo Sepa Mandate => SEPA-Mandat: D-9000000-aktuell

Properties

Given

name value
debitorNumber D-9000000
mandateReference D-9000000-aktuell
bankAccountHolder Tannenhof Bürotechnik eG (P-90000/0/aktuell)
iban DE86990200000766401011
bic DEMVDEH0
agreement 2023-03-05
validFrom 2023-03-08

Debitor of D-9000000-aktuell

HTTP GET "/api/hs/office/debitors/D-9000000" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "7f81418c-72c4-4314-98c8-0a53a7b8e7a3",
  "debitorRel" : {
    "uuid" : "ecc0c23f-c5b0-4174-8dfb-004799f5220a",
    "anchor" : {
      "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Tannenhof Bürotechnik eG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Tannenhof Bürotechnik eG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "12ff6ac0-98f7-4a21-b9fb-ed8b2b1fb9f9", // Contact: Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)
      "caption" : "Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "rechnung0@tannenhof-buerotechnik-eg.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-9000000",
  "debitorNumberSuffix" : "00",
  "partner" : {
    "uuid" : "bcac06d7-d899-4628-a254-d6c2af47e64f",
    "partnerNumber" : "P-90000",
    "partnerRel" : {
      "uuid" : "43a30219-55a6-4ebf-9f4b-03f112871878",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Tannenhof Bürotechnik eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "4e027986-5258-42bb-8776-b159ddc7d0f9", // Contact: Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)
        "caption" : "Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)",
        "postalAddress" : {
          "zipcode" : "86150",
          "country" : "Germany",
          "city" : "Augsburg",
          "street" : "Am Anger 167"
        },
        "emailAddresses" : {
          "main" : "info@tannenhof-buerotechnik-eg.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920080"
        }
      }
    },
    "details" : {
      "uuid" : "7d553ca2-f947-4a3a-a6a7-4e885a4efaaa",
      "registrationOffice" : "Registergericht Augsburg",
      "registrationNumber" : "555465",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : null,
  "vatCountryCode" : null,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "2fe60fa0-5012-4678-83e1-c09c10dbdd1c", // BankAccount: Tannenhof Bürotechnik eG (P-90000/0)
    "holder" : "Tannenhof Bürotechnik eG (P-90000/0)",
    "iban" : "DE15990200000838881174",
    "bic" : "DEMVDEH0"
  },
  "defaultPrefix" : "aaa"
}

BankAccount: Tannenhof Bürotechnik eG (P-90000/0/aktuell)

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "holder" : "Tannenhof Bürotechnik eG (P-90000/0/aktuell)",
  "iban" : "DE86990200000766401011",
  "bic" : "DEMVDEH0"
}
EOF
=> status: 201 CREATED 1e47ce02-0f76-4cf6-a9db-f0ee5cb104de

Create SEPA-Mandat: D-9000000-aktuell

HTTP POST "/api/hs/office/sepamandates" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "debitor.uuid" : "7f81418c-72c4-4314-98c8-0a53a7b8e7a3", // Debitor of D-9000000-aktuell
  "bankAccount.uuid" : "1e47ce02-0f76-4cf6-a9db-f0ee5cb104de", // BankAccount: Tannenhof Bürotechnik eG (P-90000/0/aktuell)
  "reference" : "D-9000000-aktuell",
  "agreement" : "2023-03-05",
  "validFrom" : "2023-03-08"
}
EOF
=> status: 201 CREATED 1518bdca-6303-45aa-9627-23f6b1cfeb1d

Verify the SEPA-Mandate Got Created

HTTP GET "/api/hs/office/sepamandates/1518bdca-6303-45aa-9627-23f6b1cfeb1d" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "1518bdca-6303-45aa-9627-23f6b1cfeb1d",
  "debitor" : {
    "uuid" : "7f81418c-72c4-4314-98c8-0a53a7b8e7a3", // Debitor of D-9000000-aktuell
    "debitorRel" : {
      "uuid" : "ecc0c23f-c5b0-4174-8dfb-004799f5220a",
      "anchor" : {
        "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Tannenhof Bürotechnik eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Tannenhof Bürotechnik eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "DEBITOR",
      "mark" : null,
      "contact" : {
        "uuid" : "12ff6ac0-98f7-4a21-b9fb-ed8b2b1fb9f9", // Contact: Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)
        "caption" : "Tannenhof Bürotechnik eG - Rechnungsstelle (D-9000000)",
        "postalAddress" : { },
        "emailAddresses" : {
          "main" : "rechnung0@tannenhof-buerotechnik-eg.example.org"
        },
        "phoneNumbers" : { }
      }
    },
    "debitorNumber" : "D-9000000",
    "debitorNumberSuffix" : "00",
    "partner" : {
      "uuid" : "bcac06d7-d899-4628-a254-d6c2af47e64f",
      "partnerNumber" : "P-90000",
      "partnerRel" : {
        "uuid" : "43a30219-55a6-4ebf-9f4b-03f112871878",
        "anchor" : {
          "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Hostsharing eG",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "holder" : {
          "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Tannenhof Bürotechnik eG",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "type" : "PARTNER",
        "mark" : null,
        "contact" : {
          "uuid" : "4e027986-5258-42bb-8776-b159ddc7d0f9", // Contact: Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)
          "caption" : "Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)",
          "postalAddress" : {
            "zipcode" : "86150",
            "country" : "Germany",
            "city" : "Augsburg",
            "street" : "Am Anger 167"
          },
          "emailAddresses" : {
            "main" : "info@tannenhof-buerotechnik-eg.example.org"
          },
          "phoneNumbers" : {
            "office" : "+49 171 3920080"
          }
        }
      },
      "details" : {
        "uuid" : "7d553ca2-f947-4a3a-a6a7-4e885a4efaaa",
        "registrationOffice" : "Registergericht Augsburg",
        "registrationNumber" : "555465",
        "birthName" : null,
        "birthPlace" : null,
        "birthday" : null,
        "dateOfDeath" : null
      }
    },
    "billable" : true,
    "vatId" : null,
    "vatCountryCode" : null,
    "vatBusiness" : true,
    "vatReverseCharge" : false,
    "refundBankAccount" : {
      "uuid" : "2fe60fa0-5012-4678-83e1-c09c10dbdd1c", // BankAccount: Tannenhof Bürotechnik eG (P-90000/0)
      "holder" : "Tannenhof Bürotechnik eG (P-90000/0)",
      "iban" : "DE15990200000838881174",
      "bic" : "DEMVDEH0"
    },
    "defaultPrefix" : "aaa"
  },
  "bankAccount" : {
    "uuid" : "1e47ce02-0f76-4cf6-a9db-f0ee5cb104de", // BankAccount: Tannenhof Bürotechnik eG (P-90000/0/aktuell)
    "holder" : "Tannenhof Bürotechnik eG (P-90000/0/aktuell)",
    "iban" : "DE86990200000766401011",
    "bic" : "DEMVDEH0"
  },
  "reference" : "D-9000000-aktuell",
  "agreement" : "2023-03-05",
  "validFrom" : "2023-03-08",
  "validTo" : null
}

UseCase Create Membership => Membership: Tannenhof Bürotechnik eG

Properties

Given

name value
partnerNumber P-90000
validFrom 2011-05-13
membershipFeeBillable true

Partner: P-90000

HTTP GET "/api/hs/office/partners/P-90000" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "bcac06d7-d899-4628-a254-d6c2af47e64f",
  "partnerNumber" : "P-90000",
  "partnerRel" : {
    "uuid" : "43a30219-55a6-4ebf-9f4b-03f112871878",
    "anchor" : {
      "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Hostsharing eG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Tannenhof Bürotechnik eG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "PARTNER",
    "mark" : null,
    "contact" : {
      "uuid" : "4e027986-5258-42bb-8776-b159ddc7d0f9", // Contact: Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)
      "caption" : "Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)",
      "postalAddress" : {
        "zipcode" : "86150",
        "country" : "Germany",
        "city" : "Augsburg",
        "street" : "Am Anger 167"
      },
      "emailAddresses" : {
        "main" : "info@tannenhof-buerotechnik-eg.example.org"
      },
      "phoneNumbers" : {
        "office" : "+49 171 3920080"
      }
    }
  },
  "details" : {
    "uuid" : "7d553ca2-f947-4a3a-a6a7-4e885a4efaaa",
    "registrationOffice" : "Registergericht Augsburg",
    "registrationNumber" : "555465",
    "birthName" : null,
    "birthPlace" : null,
    "birthday" : null,
    "dateOfDeath" : null
  }
}

The partner-number identifies the partner; a lookup by name could not, because a natural person carries its name in two columns and any name can be the prefix of a longer one.

Create Membership: Tannenhof Bürotechnik eG

HTTP POST "/api/hs/office/memberships" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "partner.uuid" : "bcac06d7-d899-4628-a254-d6c2af47e64f", // Partner: P-90000
  "memberNumberSuffix" : "00",
  "status" : "ACTIVE",
  "validFrom" : "2011-05-13",
  "membershipFeeBillable" : true
}
EOF
=> status: 201 CREATED 6b3cd269-95cf-42bf-8371-3c4725fe38c5

Verify That the Membership Got Created

HTTP GET "/api/hs/office/memberships/6b3cd269-95cf-42bf-8371-3c4725fe38c5" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "6b3cd269-95cf-42bf-8371-3c4725fe38c5",
  "partner" : {
    "uuid" : "bcac06d7-d899-4628-a254-d6c2af47e64f", // Partner: P-90000
    "partnerNumber" : "P-90000",
    "partnerRel" : {
      "uuid" : "43a30219-55a6-4ebf-9f4b-03f112871878",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Tannenhof Bürotechnik eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "4e027986-5258-42bb-8776-b159ddc7d0f9", // Contact: Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)
        "caption" : "Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)",
        "postalAddress" : {
          "zipcode" : "86150",
          "country" : "Germany",
          "city" : "Augsburg",
          "street" : "Am Anger 167"
        },
        "emailAddresses" : {
          "main" : "info@tannenhof-buerotechnik-eg.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920080"
        }
      }
    },
    "details" : {
      "uuid" : "7d553ca2-f947-4a3a-a6a7-4e885a4efaaa",
      "registrationOffice" : "Registergericht Augsburg",
      "registrationNumber" : "555465",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000000",
  "memberNumberSuffix" : "00",
  "validFrom" : "2011-05-13",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Properties

Given

name value
transactionType SUBSCRIPTION
memberNumber M-9000000
reference sign 2011-05-13
shareCount 37
comment initial shares on joining
transactionDate 2011-05-13

Find membershipUuid

HTTP GET "/api/hs/office/memberships/M-9000000" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "6b3cd269-95cf-42bf-8371-3c4725fe38c5",
  "partner" : {
    "uuid" : "bcac06d7-d899-4628-a254-d6c2af47e64f", // Partner: P-90000
    "partnerNumber" : "P-90000",
    "partnerRel" : {
      "uuid" : "43a30219-55a6-4ebf-9f4b-03f112871878",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Tannenhof Bürotechnik eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "4e027986-5258-42bb-8776-b159ddc7d0f9", // Contact: Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)
        "caption" : "Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)",
        "postalAddress" : {
          "zipcode" : "86150",
          "country" : "Germany",
          "city" : "Augsburg",
          "street" : "Am Anger 167"
        },
        "emailAddresses" : {
          "main" : "info@tannenhof-buerotechnik-eg.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920080"
        }
      }
    },
    "details" : {
      "uuid" : "7d553ca2-f947-4a3a-a6a7-4e885a4efaaa",
      "registrationOffice" : "Registergericht Augsburg",
      "registrationNumber" : "555465",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000000",
  "memberNumberSuffix" : "00",
  "validFrom" : "2011-05-13",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Create the Coop-Shares-SUBSCRIPTION Transaction

HTTP POST "/api/hs/office/coopsharestransactions" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "membership.uuid" : "6b3cd269-95cf-42bf-8371-3c4725fe38c5", // membershipUuid
  "transactionType" : "SUBSCRIPTION",
  "reference" : "sign 2011-05-13",
  "shareCount" : 37,
  "comment" : "initial shares on joining",
  "valueDate" : "2011-05-13"
}
EOF
=> status: 201 CREATED 57f3fd80-6f59-47da-be62-799da477a162

Verify Coop-Shares SUBSCRIPTION-Transaction

HTTP GET "/api/hs/office/coopsharestransactions/57f3fd80-6f59-47da-be62-799da477a162" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "57f3fd80-6f59-47da-be62-799da477a162",
  "membership.uuid" : "6b3cd269-95cf-42bf-8371-3c4725fe38c5", // membershipUuid
  "transactionType" : "SUBSCRIPTION",
  "shareCount" : 37,
  "valueDate" : "2011-05-13",
  "reference" : "sign 2011-05-13",
  "comment" : "initial shares on joining",
  "revertedShareTx" : null,
  "reversalShareTx" : null
}

Properties

Given

name value
transactionType DEPOSIT
memberNumber M-9000000
reference sign 2011-05-13
assetValue 2368
comment deposit for initial shares
transactionDate 2011-06-01

Find membershipUuid

HTTP GET "/api/hs/office/memberships/M-9000000" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "6b3cd269-95cf-42bf-8371-3c4725fe38c5", // membershipUuid
  "partner" : {
    "uuid" : "bcac06d7-d899-4628-a254-d6c2af47e64f", // Partner: P-90000
    "partnerNumber" : "P-90000",
    "partnerRel" : {
      "uuid" : "43a30219-55a6-4ebf-9f4b-03f112871878",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Tannenhof Bürotechnik eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "4e027986-5258-42bb-8776-b159ddc7d0f9", // Contact: Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)
        "caption" : "Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)",
        "postalAddress" : {
          "zipcode" : "86150",
          "country" : "Germany",
          "city" : "Augsburg",
          "street" : "Am Anger 167"
        },
        "emailAddresses" : {
          "main" : "info@tannenhof-buerotechnik-eg.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920080"
        }
      }
    },
    "details" : {
      "uuid" : "7d553ca2-f947-4a3a-a6a7-4e885a4efaaa",
      "registrationOffice" : "Registergericht Augsburg",
      "registrationNumber" : "555465",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000000",
  "memberNumberSuffix" : "00",
  "validFrom" : "2011-05-13",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Create the Coop-Assets-DEPOSIT Transaction

HTTP POST "/api/hs/office/coopassetstransactions" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "membership.uuid" : "6b3cd269-95cf-42bf-8371-3c4725fe38c5", // membershipUuid
  "transactionType" : "DEPOSIT",
  "reference" : "sign 2011-05-13",
  "assetValue" : 2368,
  "comment" : "deposit for initial shares",
  "valueDate" : "2011-06-01"
}
EOF
=> status: 201 CREATED 76c97ad5-048b-48e7-834b-fed00e490ae8

Verify Coop-Assets DEPOSIT-Transaction

HTTP GET "/api/hs/office/coopassetstransactions/76c97ad5-048b-48e7-834b-fed00e490ae8" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "76c97ad5-048b-48e7-834b-fed00e490ae8",
  "membership.uuid" : "6b3cd269-95cf-42bf-8371-3c4725fe38c5", // membershipUuid
  "membership.memberNumber" : "M-9000000",
  "transactionType" : "DEPOSIT",
  "assetValue" : 2368,
  "valueDate" : "2011-06-01",
  "reference" : "sign 2011-05-13",
  "comment" : "deposit for initial shares",
  "adoptionAssetTx" : null,
  "transferAssetTx" : null,
  "revertedAssetTx" : null,
  "reversalAssetTx" : null
}

UseCase Add Demo Subscription => SUBSCRIBER generalversammlung: Susanne Weber (P-90000)

Properties

Given

name value
partnerPersonName Tannenhof Bürotechnik eG
mailingList generalversammlung
holderGivenName Susanne
holderFamilyName Weber
contactCaption Susanne Weber - Vertretung (P-90000)

Create SUBSCRIBER generalversammlung: Susanne Weber (P-90000)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "generalversammlung",
  "anchor.uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
  "holder.uuid" : "261b5baa-5c86-474f-ac46-8ab62a80130d", // Person: Susanne Weber
  "contact.uuid" : "a59a7373-d983-42a4-82bf-56cd683d93b4" // Contact: Susanne Weber - Vertretung (P-90000)
}
EOF
=> status: 201 CREATED 0e2c7188-a049-4022-bdbd-5a4e7482d9e7

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/0e2c7188-a049-4022-bdbd-5a4e7482d9e7" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "0e2c7188-a049-4022-bdbd-5a4e7482d9e7",
  "anchor" : {
    "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Tannenhof Bürotechnik eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "261b5baa-5c86-474f-ac46-8ab62a80130d", // Person: Susanne Weber
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Susanne",
    "familyName" : "Weber"
  },
  "type" : "SUBSCRIBER",
  "mark" : "generalversammlung",
  "contact" : {
    "uuid" : "a59a7373-d983-42a4-82bf-56cd683d93b4", // Contact: Susanne Weber - Vertretung (P-90000)
    "caption" : "Susanne Weber - Vertretung (P-90000)",
    "postalAddress" : {
      "zipcode" : "44135",
      "country" : "Germany",
      "city" : "Dortmund",
      "street" : "Ulmenstraße 729"
    },
    "emailAddresses" : {
      "main" : "susanne-weber@tannenhof-buerotechnik-eg.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 171 3920066"
    }
  }
}

Contact: Torsten Schneider - private Mailinglisten-Adresse

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Torsten Schneider - private Mailinglisten-Adresse",
  "postalAddress" : {
    "street" : "Birkenallee 253",
    "zipcode" : "80331",
    "city" : "München",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "main" : "+49 89 99998954"
  },
  "emailAddresses" : {
    "main" : "torsten-schneider@example.net"
  }
}
EOF
=> status: 201 CREATED 8ce59b0d-8544-4c78-b4f6-d726ea3dea15

UseCase Add Demo Subscription => SUBSCRIBER members-announce: Torsten Schneider (P-90000)

Properties

Given

name value
partnerPersonName Tannenhof Bürotechnik eG
mailingList members-announce
holderGivenName Torsten
holderFamilyName Schneider
contactCaption Torsten Schneider - private Mailinglisten-Adresse

Create SUBSCRIBER members-announce: Torsten Schneider (P-90000)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "members-announce",
  "anchor.uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
  "holder.uuid" : "645d0851-7a68-4871-b34a-820a9da2423e", // Person: Torsten Schneider
  "contact.uuid" : "8ce59b0d-8544-4c78-b4f6-d726ea3dea15" // Contact: Torsten Schneider - private Mailinglisten-Adresse
}
EOF
=> status: 201 CREATED c54f9efe-e136-4f3d-90d9-a3a0551fcb89

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/c54f9efe-e136-4f3d-90d9-a3a0551fcb89" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "c54f9efe-e136-4f3d-90d9-a3a0551fcb89",
  "anchor" : {
    "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Tannenhof Bürotechnik eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "645d0851-7a68-4871-b34a-820a9da2423e", // Person: Torsten Schneider
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Torsten",
    "familyName" : "Schneider"
  },
  "type" : "SUBSCRIBER",
  "mark" : "members-announce",
  "contact" : {
    "uuid" : "8ce59b0d-8544-4c78-b4f6-d726ea3dea15", // Contact: Torsten Schneider - private Mailinglisten-Adresse
    "caption" : "Torsten Schneider - private Mailinglisten-Adresse",
    "postalAddress" : {
      "zipcode" : "80331",
      "country" : "Germany",
      "city" : "München",
      "street" : "Birkenallee 253"
    },
    "emailAddresses" : {
      "main" : "torsten-schneider@example.net"
    },
    "phoneNumbers" : {
      "main" : "+49 89 99998954"
    }
  }
}

UseCase Add Demo Subscription => SUBSCRIBER customers-announce: Torsten Schneider (P-90000)

Properties

Given

name value
partnerPersonName Tannenhof Bürotechnik eG
mailingList customers-announce
holderGivenName Torsten
holderFamilyName Schneider
contactCaption Torsten Schneider - private Mailinglisten-Adresse

Create SUBSCRIBER customers-announce: Torsten Schneider (P-90000)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "customers-announce",
  "anchor.uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
  "holder.uuid" : "645d0851-7a68-4871-b34a-820a9da2423e", // Person: Torsten Schneider
  "contact.uuid" : "8ce59b0d-8544-4c78-b4f6-d726ea3dea15" // Contact: Torsten Schneider - private Mailinglisten-Adresse
}
EOF
=> status: 201 CREATED b3d49b95-5494-4e39-abe6-e14f8ca096ed

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/b3d49b95-5494-4e39-abe6-e14f8ca096ed" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "b3d49b95-5494-4e39-abe6-e14f8ca096ed",
  "anchor" : {
    "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Tannenhof Bürotechnik eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "645d0851-7a68-4871-b34a-820a9da2423e", // Person: Torsten Schneider
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Torsten",
    "familyName" : "Schneider"
  },
  "type" : "SUBSCRIBER",
  "mark" : "customers-announce",
  "contact" : {
    "uuid" : "8ce59b0d-8544-4c78-b4f6-d726ea3dea15", // Contact: Torsten Schneider - private Mailinglisten-Adresse
    "caption" : "Torsten Schneider - private Mailinglisten-Adresse",
    "postalAddress" : {
      "zipcode" : "80331",
      "country" : "Germany",
      "city" : "München",
      "street" : "Birkenallee 253"
    },
    "emailAddresses" : {
      "main" : "torsten-schneider@example.net"
    },
    "phoneNumbers" : {
      "main" : "+49 89 99998954"
    }
  }
}

Contact: Susanne Weber - private Mailinglisten-Adresse

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Susanne Weber - private Mailinglisten-Adresse",
  "postalAddress" : {
    "name" : "Geschäftsführung",
    "street" : "Schlehenweg 260",
    "zipcode" : "80331",
    "city" : "München",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "main" : "+49 89 99998045"
  },
  "emailAddresses" : {
    "main" : "susanne-weber@example.net"
  }
}
EOF
=> status: 201 CREATED 8fbaeb6c-e0a0-404d-aba6-2238665004a1

UseCase Add Demo Subscription => SUBSCRIBER customers-discuss: Susanne Weber (P-90000)

Properties

Given

name value
partnerPersonName Tannenhof Bürotechnik eG
mailingList customers-discuss
holderGivenName Susanne
holderFamilyName Weber
contactCaption Susanne Weber - private Mailinglisten-Adresse

Create SUBSCRIBER customers-discuss: Susanne Weber (P-90000)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "customers-discuss",
  "anchor.uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
  "holder.uuid" : "261b5baa-5c86-474f-ac46-8ab62a80130d", // Person: Susanne Weber
  "contact.uuid" : "8fbaeb6c-e0a0-404d-aba6-2238665004a1" // Contact: Susanne Weber - private Mailinglisten-Adresse
}
EOF
=> status: 201 CREATED e2b700dc-9a03-4fad-9ef0-3be959f28d80

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/e2b700dc-9a03-4fad-9ef0-3be959f28d80" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "e2b700dc-9a03-4fad-9ef0-3be959f28d80",
  "anchor" : {
    "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Tannenhof Bürotechnik eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "261b5baa-5c86-474f-ac46-8ab62a80130d", // Person: Susanne Weber
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Susanne",
    "familyName" : "Weber"
  },
  "type" : "SUBSCRIBER",
  "mark" : "customers-discuss",
  "contact" : {
    "uuid" : "8fbaeb6c-e0a0-404d-aba6-2238665004a1", // Contact: Susanne Weber - private Mailinglisten-Adresse
    "caption" : "Susanne Weber - private Mailinglisten-Adresse",
    "postalAddress" : {
      "zipcode" : "80331",
      "country" : "Germany",
      "city" : "München",
      "street" : "Schlehenweg 260",
      "name" : "Geschäftsführung"
    },
    "emailAddresses" : {
      "main" : "susanne-weber@example.net"
    },
    "phoneNumbers" : {
      "main" : "+49 89 99998045"
    }
  }
}

UseCase Add Demo Subscription => SUBSCRIBER operations-announce: Torsten Schneider (P-90000)

Properties

Given

name value
partnerPersonName Tannenhof Bürotechnik eG
mailingList operations-announce
holderGivenName Torsten
holderFamilyName Schneider
contactCaption Torsten Schneider - Vertretung (P-90000)

Create SUBSCRIBER operations-announce: Torsten Schneider (P-90000)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "operations-announce",
  "anchor.uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
  "holder.uuid" : "645d0851-7a68-4871-b34a-820a9da2423e", // Person: Torsten Schneider
  "contact.uuid" : "2ef782c5-934a-485e-87bd-3145d32fce22" // Contact: Torsten Schneider - Vertretung (P-90000)
}
EOF
=> status: 201 CREATED e9166baf-d88b-421e-b890-ebc6ec37a3b3

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/e9166baf-d88b-421e-b890-ebc6ec37a3b3" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "e9166baf-d88b-421e-b890-ebc6ec37a3b3",
  "anchor" : {
    "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Tannenhof Bürotechnik eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "645d0851-7a68-4871-b34a-820a9da2423e", // Person: Torsten Schneider
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Torsten",
    "familyName" : "Schneider"
  },
  "type" : "SUBSCRIBER",
  "mark" : "operations-announce",
  "contact" : {
    "uuid" : "2ef782c5-934a-485e-87bd-3145d32fce22", // Contact: Torsten Schneider - Vertretung (P-90000)
    "caption" : "Torsten Schneider - Vertretung (P-90000)",
    "postalAddress" : {
      "zipcode" : "50667",
      "country" : "Germany",
      "city" : "Köln",
      "street" : "Wiesengrund 246",
      "name" : "Geschäftsführung"
    },
    "emailAddresses" : {
      "main" : "torsten-schneider@tannenhof-buerotechnik-eg.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 221 4710870"
    }
  }
}

UseCase Create Partner => Partner: P-90001 - Christian Krause

Properties

Given

name value
partnerNumber P-90001
personType NATURAL_PERSON
contactCaption Christian Krause - Hauptkontakt (P-90001)
postalAddress “name”: “Buchhaltung”,
        “street”: “Kirschblütenweg 603”,
        “zipcode”: “90402”,
        “city”: “Nürnberg”,
        “country”: “Germany”
officePhoneNumber +49 176 04069019
emailAddress post@christian-krause.example.org
givenName Christian
familyName Krause
birthday 1954-05-11

Person: Hostsharing eG

HTTP GET "/api/hs/office/persons?name=Hostsharing+eG" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Hostsharing eG",
  "salutation" : null,
  "title" : null,
  "givenName" : null,
  "familyName" : null
} ]

Even in production data we expect this query to return just a single result.

Person: Christian Krause

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "givenName" : "Christian",
  "familyName" : "Krause"
}
EOF
=> status: 201 CREATED 62871881-ef22-4dbe-8b22-867976e43fdb

Contact: Christian Krause - Hauptkontakt (P-90001)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Christian Krause - Hauptkontakt (P-90001)",
  "postalAddress" : {
    "name" : "Buchhaltung",
    "street" : "Kirschblütenweg 603",
    "zipcode" : "90402",
    "city" : "Nürnberg",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 176 04069019"
  },
  "emailAddresses" : {
    "main" : "post@christian-krause.example.org"
  }
}
EOF
=> status: 201 CREATED f01dbcae-b3db-40bc-978a-91d28ba3d13e

Create Partner: P-90001 - Christian Krause

HTTP POST "/api/hs/office/partners" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "partnerNumber" : "P-90001",
  "partnerRel" : {
    "anchor.uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
    "holder.uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
    "contact.uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e" // Contact: Christian Krause - Hauptkontakt (P-90001)
  },
  "details" : {
    "birthday" : "1954-05-11"
  }
}
EOF
=> status: 201 CREATED 544f58b6-6221-4ace-8d48-6709dc2fc15c

Verify the New Partner Relation

HTTP GET "/api/hs/office/relations?relationType=PARTNER&contactData=Christian+Krause+-+Hauptkontakt+%28P-90001%29" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "468cef95-e691-4f4b-a0e1-e7cf0ade5bc1",
  "anchor" : {
    "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Christian",
    "familyName" : "Krause"
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e", // Contact: Christian Krause - Hauptkontakt (P-90001)
    "caption" : "Christian Krause - Hauptkontakt (P-90001)",
    "postalAddress" : {
      "zipcode" : "90402",
      "country" : "Germany",
      "city" : "Nürnberg",
      "street" : "Kirschblütenweg 603",
      "name" : "Buchhaltung"
    },
    "emailAddresses" : {
      "main" : "post@christian-krause.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 176 04069019"
    }
  }
} ]

UseCase Create Demo Debitor => Debitor: Christian Krause - Rechnungsstelle (D-9000100)

Properties

Given

name value
partnerPersonName Christian Krause
debitorNumberSuffix 00
billable true
vatBusiness true
defaultPrefix aab
bankAccountHolder Christian Krause (P-90001/0)
iban DE69990100000452472122
bic DEMSDEH0
billingContactCaption Christian Krause - Rechnungsstelle (D-9000100)
billingContactEmailAddress rechnung0@christian-krause.example.org

BankAccount: Christian Krause (P-90001/0)

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "holder" : "Christian Krause (P-90001/0)",
  "iban" : "DE69990100000452472122",
  "bic" : "DEMSDEH0"
}
EOF
=> status: 201 CREATED 3fe1887d-8af1-44ef-9188-cdfb3706e2cb

Contact: Christian Krause - Rechnungsstelle (D-9000100)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Christian Krause - Rechnungsstelle (D-9000100)",
  "emailAddresses" : {
    "main" : "rechnung0@christian-krause.example.org"
  }
}
EOF
=> status: 201 CREATED 5d9f94ab-14ce-4fff-ac12-16540ae5d078

Create Debitor: Christian Krause - Rechnungsstelle (D-9000100)

HTTP POST "/api/hs/office/debitors" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "debitorRel" : {
    "anchor.uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
    "holder.uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
    "contact.uuid" : "5d9f94ab-14ce-4fff-ac12-16540ae5d078" // Contact: Christian Krause - Rechnungsstelle (D-9000100)
  },
  "debitorNumberSuffix" : "00",
  "billable" : true,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount.uuid" : "3fe1887d-8af1-44ef-9188-cdfb3706e2cb", // BankAccount: Christian Krause (P-90001/0)
  "defaultPrefix" : "aab"
}
EOF
=> status: 201 CREATED 54c1a7b7-3c36-492a-ac35-2e4067eeeb2b

Verify the Debitor Got Created

HTTP GET "/api/hs/office/debitors/54c1a7b7-3c36-492a-ac35-2e4067eeeb2b" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "54c1a7b7-3c36-492a-ac35-2e4067eeeb2b",
  "debitorRel" : {
    "uuid" : "ca5c8d1e-72a8-4f36-a6dc-b95d58df6b92",
    "anchor" : {
      "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
      "personType" : "NATURAL_PERSON",
      "tradeName" : null,
      "salutation" : null,
      "title" : null,
      "givenName" : "Christian",
      "familyName" : "Krause"
    },
    "holder" : {
      "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
      "personType" : "NATURAL_PERSON",
      "tradeName" : null,
      "salutation" : null,
      "title" : null,
      "givenName" : "Christian",
      "familyName" : "Krause"
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "5d9f94ab-14ce-4fff-ac12-16540ae5d078", // Contact: Christian Krause - Rechnungsstelle (D-9000100)
      "caption" : "Christian Krause - Rechnungsstelle (D-9000100)",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "rechnung0@christian-krause.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-9000100",
  "debitorNumberSuffix" : "00",
  "partner" : {
    "uuid" : "544f58b6-6221-4ace-8d48-6709dc2fc15c",
    "partnerNumber" : "P-90001",
    "partnerRel" : {
      "uuid" : "468cef95-e691-4f4b-a0e1-e7cf0ade5bc1",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
        "personType" : "NATURAL_PERSON",
        "tradeName" : null,
        "salutation" : null,
        "title" : null,
        "givenName" : "Christian",
        "familyName" : "Krause"
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e", // Contact: Christian Krause - Hauptkontakt (P-90001)
        "caption" : "Christian Krause - Hauptkontakt (P-90001)",
        "postalAddress" : {
          "zipcode" : "90402",
          "country" : "Germany",
          "city" : "Nürnberg",
          "street" : "Kirschblütenweg 603",
          "name" : "Buchhaltung"
        },
        "emailAddresses" : {
          "main" : "post@christian-krause.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 176 04069019"
        }
      }
    },
    "details" : {
      "uuid" : "3ebf35f8-0bd8-4eba-ad77-eebecb49858c",
      "registrationOffice" : null,
      "registrationNumber" : null,
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : "1954-05-11",
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : null,
  "vatCountryCode" : null,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "3fe1887d-8af1-44ef-9188-cdfb3706e2cb", // BankAccount: Christian Krause (P-90001/0)
    "holder" : "Christian Krause (P-90001/0)",
    "iban" : "DE69990100000452472122",
    "bic" : "DEMSDEH0"
  },
  "defaultPrefix" : "aab"
}

UseCase Create Demo Sepa Mandate => SEPA-Mandat: D-9000100-aktuell

Properties

Given

name value
debitorNumber D-9000100
mandateReference D-9000100-aktuell
bankAccountHolder Christian Krause (P-90001/0/aktuell)
iban DE34990400000981678500
bic DEMDDEB0
agreement 2023-07-17
validFrom 2023-07-21

Debitor of D-9000100-aktuell

HTTP GET "/api/hs/office/debitors/D-9000100" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "54c1a7b7-3c36-492a-ac35-2e4067eeeb2b",
  "debitorRel" : {
    "uuid" : "ca5c8d1e-72a8-4f36-a6dc-b95d58df6b92",
    "anchor" : {
      "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
      "personType" : "NATURAL_PERSON",
      "tradeName" : null,
      "salutation" : null,
      "title" : null,
      "givenName" : "Christian",
      "familyName" : "Krause"
    },
    "holder" : {
      "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
      "personType" : "NATURAL_PERSON",
      "tradeName" : null,
      "salutation" : null,
      "title" : null,
      "givenName" : "Christian",
      "familyName" : "Krause"
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "5d9f94ab-14ce-4fff-ac12-16540ae5d078", // Contact: Christian Krause - Rechnungsstelle (D-9000100)
      "caption" : "Christian Krause - Rechnungsstelle (D-9000100)",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "rechnung0@christian-krause.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-9000100",
  "debitorNumberSuffix" : "00",
  "partner" : {
    "uuid" : "544f58b6-6221-4ace-8d48-6709dc2fc15c",
    "partnerNumber" : "P-90001",
    "partnerRel" : {
      "uuid" : "468cef95-e691-4f4b-a0e1-e7cf0ade5bc1",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
        "personType" : "NATURAL_PERSON",
        "tradeName" : null,
        "salutation" : null,
        "title" : null,
        "givenName" : "Christian",
        "familyName" : "Krause"
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e", // Contact: Christian Krause - Hauptkontakt (P-90001)
        "caption" : "Christian Krause - Hauptkontakt (P-90001)",
        "postalAddress" : {
          "zipcode" : "90402",
          "country" : "Germany",
          "city" : "Nürnberg",
          "street" : "Kirschblütenweg 603",
          "name" : "Buchhaltung"
        },
        "emailAddresses" : {
          "main" : "post@christian-krause.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 176 04069019"
        }
      }
    },
    "details" : {
      "uuid" : "3ebf35f8-0bd8-4eba-ad77-eebecb49858c",
      "registrationOffice" : null,
      "registrationNumber" : null,
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : "1954-05-11",
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : null,
  "vatCountryCode" : null,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "3fe1887d-8af1-44ef-9188-cdfb3706e2cb", // BankAccount: Christian Krause (P-90001/0)
    "holder" : "Christian Krause (P-90001/0)",
    "iban" : "DE69990100000452472122",
    "bic" : "DEMSDEH0"
  },
  "defaultPrefix" : "aab"
}

BankAccount: Christian Krause (P-90001/0/aktuell)

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "holder" : "Christian Krause (P-90001/0/aktuell)",
  "iban" : "DE34990400000981678500",
  "bic" : "DEMDDEB0"
}
EOF
=> status: 201 CREATED dd29373d-d49b-4092-b1d7-f97070441467

Create SEPA-Mandat: D-9000100-aktuell

HTTP POST "/api/hs/office/sepamandates" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "debitor.uuid" : "54c1a7b7-3c36-492a-ac35-2e4067eeeb2b", // Debitor of D-9000100-aktuell
  "bankAccount.uuid" : "dd29373d-d49b-4092-b1d7-f97070441467", // BankAccount: Christian Krause (P-90001/0/aktuell)
  "reference" : "D-9000100-aktuell",
  "agreement" : "2023-07-17",
  "validFrom" : "2023-07-21"
}
EOF
=> status: 201 CREATED 12103c4e-6641-4732-809e-0308c9a964f9

Verify the SEPA-Mandate Got Created

HTTP GET "/api/hs/office/sepamandates/12103c4e-6641-4732-809e-0308c9a964f9" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "12103c4e-6641-4732-809e-0308c9a964f9",
  "debitor" : {
    "uuid" : "54c1a7b7-3c36-492a-ac35-2e4067eeeb2b", // Debitor of D-9000100-aktuell
    "debitorRel" : {
      "uuid" : "ca5c8d1e-72a8-4f36-a6dc-b95d58df6b92",
      "anchor" : {
        "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
        "personType" : "NATURAL_PERSON",
        "tradeName" : null,
        "salutation" : null,
        "title" : null,
        "givenName" : "Christian",
        "familyName" : "Krause"
      },
      "holder" : {
        "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
        "personType" : "NATURAL_PERSON",
        "tradeName" : null,
        "salutation" : null,
        "title" : null,
        "givenName" : "Christian",
        "familyName" : "Krause"
      },
      "type" : "DEBITOR",
      "mark" : null,
      "contact" : {
        "uuid" : "5d9f94ab-14ce-4fff-ac12-16540ae5d078", // Contact: Christian Krause - Rechnungsstelle (D-9000100)
        "caption" : "Christian Krause - Rechnungsstelle (D-9000100)",
        "postalAddress" : { },
        "emailAddresses" : {
          "main" : "rechnung0@christian-krause.example.org"
        },
        "phoneNumbers" : { }
      }
    },
    "debitorNumber" : "D-9000100",
    "debitorNumberSuffix" : "00",
    "partner" : {
      "uuid" : "544f58b6-6221-4ace-8d48-6709dc2fc15c",
      "partnerNumber" : "P-90001",
      "partnerRel" : {
        "uuid" : "468cef95-e691-4f4b-a0e1-e7cf0ade5bc1",
        "anchor" : {
          "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Hostsharing eG",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "holder" : {
          "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
          "personType" : "NATURAL_PERSON",
          "tradeName" : null,
          "salutation" : null,
          "title" : null,
          "givenName" : "Christian",
          "familyName" : "Krause"
        },
        "type" : "PARTNER",
        "mark" : null,
        "contact" : {
          "uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e", // Contact: Christian Krause - Hauptkontakt (P-90001)
          "caption" : "Christian Krause - Hauptkontakt (P-90001)",
          "postalAddress" : {
            "zipcode" : "90402",
            "country" : "Germany",
            "city" : "Nürnberg",
            "street" : "Kirschblütenweg 603",
            "name" : "Buchhaltung"
          },
          "emailAddresses" : {
            "main" : "post@christian-krause.example.org"
          },
          "phoneNumbers" : {
            "office" : "+49 176 04069019"
          }
        }
      },
      "details" : {
        "uuid" : "3ebf35f8-0bd8-4eba-ad77-eebecb49858c",
        "registrationOffice" : null,
        "registrationNumber" : null,
        "birthName" : null,
        "birthPlace" : null,
        "birthday" : "1954-05-11",
        "dateOfDeath" : null
      }
    },
    "billable" : true,
    "vatId" : null,
    "vatCountryCode" : null,
    "vatBusiness" : true,
    "vatReverseCharge" : false,
    "refundBankAccount" : {
      "uuid" : "3fe1887d-8af1-44ef-9188-cdfb3706e2cb", // BankAccount: Christian Krause (P-90001/0)
      "holder" : "Christian Krause (P-90001/0)",
      "iban" : "DE69990100000452472122",
      "bic" : "DEMSDEH0"
    },
    "defaultPrefix" : "aab"
  },
  "bankAccount" : {
    "uuid" : "dd29373d-d49b-4092-b1d7-f97070441467", // BankAccount: Christian Krause (P-90001/0/aktuell)
    "holder" : "Christian Krause (P-90001/0/aktuell)",
    "iban" : "DE34990400000981678500",
    "bic" : "DEMDDEB0"
  },
  "reference" : "D-9000100-aktuell",
  "agreement" : "2023-07-17",
  "validFrom" : "2023-07-21",
  "validTo" : null
}

UseCase Create Membership => Membership: Christian Krause

Properties

Given

name value
partnerNumber P-90001
validFrom 2008-01-10
membershipFeeBillable true

Partner: P-90001

HTTP GET "/api/hs/office/partners/P-90001" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "544f58b6-6221-4ace-8d48-6709dc2fc15c",
  "partnerNumber" : "P-90001",
  "partnerRel" : {
    "uuid" : "468cef95-e691-4f4b-a0e1-e7cf0ade5bc1",
    "anchor" : {
      "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Hostsharing eG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
      "personType" : "NATURAL_PERSON",
      "tradeName" : null,
      "salutation" : null,
      "title" : null,
      "givenName" : "Christian",
      "familyName" : "Krause"
    },
    "type" : "PARTNER",
    "mark" : null,
    "contact" : {
      "uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e", // Contact: Christian Krause - Hauptkontakt (P-90001)
      "caption" : "Christian Krause - Hauptkontakt (P-90001)",
      "postalAddress" : {
        "zipcode" : "90402",
        "country" : "Germany",
        "city" : "Nürnberg",
        "street" : "Kirschblütenweg 603",
        "name" : "Buchhaltung"
      },
      "emailAddresses" : {
        "main" : "post@christian-krause.example.org"
      },
      "phoneNumbers" : {
        "office" : "+49 176 04069019"
      }
    }
  },
  "details" : {
    "uuid" : "3ebf35f8-0bd8-4eba-ad77-eebecb49858c",
    "registrationOffice" : null,
    "registrationNumber" : null,
    "birthName" : null,
    "birthPlace" : null,
    "birthday" : "1954-05-11",
    "dateOfDeath" : null
  }
}

The partner-number identifies the partner; a lookup by name could not, because a natural person carries its name in two columns and any name can be the prefix of a longer one.

Create Membership: Christian Krause

HTTP POST "/api/hs/office/memberships" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "partner.uuid" : "544f58b6-6221-4ace-8d48-6709dc2fc15c", // Partner: P-90001
  "memberNumberSuffix" : "00",
  "status" : "ACTIVE",
  "validFrom" : "2008-01-10",
  "membershipFeeBillable" : true
}
EOF
=> status: 201 CREATED eca9ffa8-b7b0-4e01-b5eb-f9e06b65adff

Verify That the Membership Got Created

HTTP GET "/api/hs/office/memberships/eca9ffa8-b7b0-4e01-b5eb-f9e06b65adff" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "eca9ffa8-b7b0-4e01-b5eb-f9e06b65adff",
  "partner" : {
    "uuid" : "544f58b6-6221-4ace-8d48-6709dc2fc15c", // Partner: P-90001
    "partnerNumber" : "P-90001",
    "partnerRel" : {
      "uuid" : "468cef95-e691-4f4b-a0e1-e7cf0ade5bc1",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
        "personType" : "NATURAL_PERSON",
        "tradeName" : null,
        "salutation" : null,
        "title" : null,
        "givenName" : "Christian",
        "familyName" : "Krause"
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e", // Contact: Christian Krause - Hauptkontakt (P-90001)
        "caption" : "Christian Krause - Hauptkontakt (P-90001)",
        "postalAddress" : {
          "zipcode" : "90402",
          "country" : "Germany",
          "city" : "Nürnberg",
          "street" : "Kirschblütenweg 603",
          "name" : "Buchhaltung"
        },
        "emailAddresses" : {
          "main" : "post@christian-krause.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 176 04069019"
        }
      }
    },
    "details" : {
      "uuid" : "3ebf35f8-0bd8-4eba-ad77-eebecb49858c",
      "registrationOffice" : null,
      "registrationNumber" : null,
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : "1954-05-11",
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000100",
  "memberNumberSuffix" : "00",
  "validFrom" : "2008-01-10",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Properties

Given

name value
transactionType SUBSCRIPTION
memberNumber M-9000100
reference sign 2008-01-10
shareCount 32
comment initial shares on joining
transactionDate 2008-01-10

Find membershipUuid

HTTP GET "/api/hs/office/memberships/M-9000100" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "eca9ffa8-b7b0-4e01-b5eb-f9e06b65adff",
  "partner" : {
    "uuid" : "544f58b6-6221-4ace-8d48-6709dc2fc15c", // Partner: P-90001
    "partnerNumber" : "P-90001",
    "partnerRel" : {
      "uuid" : "468cef95-e691-4f4b-a0e1-e7cf0ade5bc1",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
        "personType" : "NATURAL_PERSON",
        "tradeName" : null,
        "salutation" : null,
        "title" : null,
        "givenName" : "Christian",
        "familyName" : "Krause"
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e", // Contact: Christian Krause - Hauptkontakt (P-90001)
        "caption" : "Christian Krause - Hauptkontakt (P-90001)",
        "postalAddress" : {
          "zipcode" : "90402",
          "country" : "Germany",
          "city" : "Nürnberg",
          "street" : "Kirschblütenweg 603",
          "name" : "Buchhaltung"
        },
        "emailAddresses" : {
          "main" : "post@christian-krause.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 176 04069019"
        }
      }
    },
    "details" : {
      "uuid" : "3ebf35f8-0bd8-4eba-ad77-eebecb49858c",
      "registrationOffice" : null,
      "registrationNumber" : null,
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : "1954-05-11",
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000100",
  "memberNumberSuffix" : "00",
  "validFrom" : "2008-01-10",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Create the Coop-Shares-SUBSCRIPTION Transaction

HTTP POST "/api/hs/office/coopsharestransactions" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "membership.uuid" : "eca9ffa8-b7b0-4e01-b5eb-f9e06b65adff", // membershipUuid
  "transactionType" : "SUBSCRIPTION",
  "reference" : "sign 2008-01-10",
  "shareCount" : 32,
  "comment" : "initial shares on joining",
  "valueDate" : "2008-01-10"
}
EOF
=> status: 201 CREATED 3ae21cf1-0dfd-442b-827b-bbd6709033c9

Verify Coop-Shares SUBSCRIPTION-Transaction

HTTP GET "/api/hs/office/coopsharestransactions/3ae21cf1-0dfd-442b-827b-bbd6709033c9" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "3ae21cf1-0dfd-442b-827b-bbd6709033c9",
  "membership.uuid" : "eca9ffa8-b7b0-4e01-b5eb-f9e06b65adff", // membershipUuid
  "transactionType" : "SUBSCRIPTION",
  "shareCount" : 32,
  "valueDate" : "2008-01-10",
  "reference" : "sign 2008-01-10",
  "comment" : "initial shares on joining",
  "revertedShareTx" : null,
  "reversalShareTx" : null
}

Properties

Given

name value
transactionType DEPOSIT
memberNumber M-9000100
reference sign 2008-01-10
assetValue 2048
comment deposit for initial shares
transactionDate 2008-01-15

Find membershipUuid

HTTP GET "/api/hs/office/memberships/M-9000100" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "eca9ffa8-b7b0-4e01-b5eb-f9e06b65adff", // membershipUuid
  "partner" : {
    "uuid" : "544f58b6-6221-4ace-8d48-6709dc2fc15c", // Partner: P-90001
    "partnerNumber" : "P-90001",
    "partnerRel" : {
      "uuid" : "468cef95-e691-4f4b-a0e1-e7cf0ade5bc1",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
        "personType" : "NATURAL_PERSON",
        "tradeName" : null,
        "salutation" : null,
        "title" : null,
        "givenName" : "Christian",
        "familyName" : "Krause"
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e", // Contact: Christian Krause - Hauptkontakt (P-90001)
        "caption" : "Christian Krause - Hauptkontakt (P-90001)",
        "postalAddress" : {
          "zipcode" : "90402",
          "country" : "Germany",
          "city" : "Nürnberg",
          "street" : "Kirschblütenweg 603",
          "name" : "Buchhaltung"
        },
        "emailAddresses" : {
          "main" : "post@christian-krause.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 176 04069019"
        }
      }
    },
    "details" : {
      "uuid" : "3ebf35f8-0bd8-4eba-ad77-eebecb49858c",
      "registrationOffice" : null,
      "registrationNumber" : null,
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : "1954-05-11",
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000100",
  "memberNumberSuffix" : "00",
  "validFrom" : "2008-01-10",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Create the Coop-Assets-DEPOSIT Transaction

HTTP POST "/api/hs/office/coopassetstransactions" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "membership.uuid" : "eca9ffa8-b7b0-4e01-b5eb-f9e06b65adff", // membershipUuid
  "transactionType" : "DEPOSIT",
  "reference" : "sign 2008-01-10",
  "assetValue" : 2048,
  "comment" : "deposit for initial shares",
  "valueDate" : "2008-01-15"
}
EOF
=> status: 201 CREATED 371f34f3-d0c0-4c40-8cd0-bf40644657f3

Verify Coop-Assets DEPOSIT-Transaction

HTTP GET "/api/hs/office/coopassetstransactions/371f34f3-d0c0-4c40-8cd0-bf40644657f3" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "371f34f3-d0c0-4c40-8cd0-bf40644657f3",
  "membership.uuid" : "eca9ffa8-b7b0-4e01-b5eb-f9e06b65adff", // membershipUuid
  "membership.memberNumber" : "M-9000100",
  "transactionType" : "DEPOSIT",
  "assetValue" : 2048,
  "valueDate" : "2008-01-15",
  "reference" : "sign 2008-01-10",
  "comment" : "deposit for initial shares",
  "adoptionAssetTx" : null,
  "transferAssetTx" : null,
  "revertedAssetTx" : null,
  "reversalAssetTx" : null
}

UseCase Add Demo Subscription => SUBSCRIBER generalversammlung: Christian Krause (P-90001)

Properties

Given

name value
partnerPersonName Christian Krause
mailingList generalversammlung
holderGivenName Christian
holderFamilyName Krause
contactCaption Christian Krause - Hauptkontakt (P-90001)

Create SUBSCRIBER generalversammlung: Christian Krause (P-90001)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "generalversammlung",
  "anchor.uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
  "holder.uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
  "contact.uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e" // Contact: Christian Krause - Hauptkontakt (P-90001)
}
EOF
=> status: 201 CREATED d517e32f-7c4b-44ca-a216-0531c5a22676

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/d517e32f-7c4b-44ca-a216-0531c5a22676" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "d517e32f-7c4b-44ca-a216-0531c5a22676",
  "anchor" : {
    "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Christian",
    "familyName" : "Krause"
  },
  "holder" : {
    "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Christian",
    "familyName" : "Krause"
  },
  "type" : "SUBSCRIBER",
  "mark" : "generalversammlung",
  "contact" : {
    "uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e", // Contact: Christian Krause - Hauptkontakt (P-90001)
    "caption" : "Christian Krause - Hauptkontakt (P-90001)",
    "postalAddress" : {
      "zipcode" : "90402",
      "country" : "Germany",
      "city" : "Nürnberg",
      "street" : "Kirschblütenweg 603",
      "name" : "Buchhaltung"
    },
    "emailAddresses" : {
      "main" : "post@christian-krause.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 176 04069019"
    }
  }
}

UseCase Add Demo Subscription => SUBSCRIBER customers-announce: Christian Krause (P-90001)

Properties

Given

name value
partnerPersonName Christian Krause
mailingList customers-announce
holderGivenName Christian
holderFamilyName Krause
contactCaption Christian Krause - Hauptkontakt (P-90001)

Create SUBSCRIBER customers-announce: Christian Krause (P-90001)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "customers-announce",
  "anchor.uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
  "holder.uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
  "contact.uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e" // Contact: Christian Krause - Hauptkontakt (P-90001)
}
EOF
=> status: 201 CREATED 808a0a63-9018-4ea0-a9d7-26bc38f7f9c8

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/808a0a63-9018-4ea0-a9d7-26bc38f7f9c8" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "808a0a63-9018-4ea0-a9d7-26bc38f7f9c8",
  "anchor" : {
    "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Christian",
    "familyName" : "Krause"
  },
  "holder" : {
    "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Christian",
    "familyName" : "Krause"
  },
  "type" : "SUBSCRIBER",
  "mark" : "customers-announce",
  "contact" : {
    "uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e", // Contact: Christian Krause - Hauptkontakt (P-90001)
    "caption" : "Christian Krause - Hauptkontakt (P-90001)",
    "postalAddress" : {
      "zipcode" : "90402",
      "country" : "Germany",
      "city" : "Nürnberg",
      "street" : "Kirschblütenweg 603",
      "name" : "Buchhaltung"
    },
    "emailAddresses" : {
      "main" : "post@christian-krause.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 176 04069019"
    }
  }
}

UseCase Add Demo Subscription => SUBSCRIBER operations-announce: Christian Krause (P-90001)

Properties

Given

name value
partnerPersonName Christian Krause
mailingList operations-announce
holderGivenName Christian
holderFamilyName Krause
contactCaption Christian Krause - Hauptkontakt (P-90001)

Create SUBSCRIBER operations-announce: Christian Krause (P-90001)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "operations-announce",
  "anchor.uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
  "holder.uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
  "contact.uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e" // Contact: Christian Krause - Hauptkontakt (P-90001)
}
EOF
=> status: 201 CREATED 2c1df612-ef5d-45d3-bd32-2edd582da090

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/2c1df612-ef5d-45d3-bd32-2edd582da090" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "2c1df612-ef5d-45d3-bd32-2edd582da090",
  "anchor" : {
    "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Christian",
    "familyName" : "Krause"
  },
  "holder" : {
    "uuid" : "62871881-ef22-4dbe-8b22-867976e43fdb", // Person: Christian Krause
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Christian",
    "familyName" : "Krause"
  },
  "type" : "SUBSCRIBER",
  "mark" : "operations-announce",
  "contact" : {
    "uuid" : "f01dbcae-b3db-40bc-978a-91d28ba3d13e", // Contact: Christian Krause - Hauptkontakt (P-90001)
    "caption" : "Christian Krause - Hauptkontakt (P-90001)",
    "postalAddress" : {
      "zipcode" : "90402",
      "country" : "Germany",
      "city" : "Nürnberg",
      "street" : "Kirschblütenweg 603",
      "name" : "Buchhaltung"
    },
    "emailAddresses" : {
      "main" : "post@christian-krause.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 176 04069019"
    }
  }
}

UseCase Create Partner => Partner: P-90002 - Fischer Pflege GmbH

Properties

Given

name value
partnerNumber P-90002
personType LEGAL_PERSON
contactCaption Fischer Pflege GmbH - Hauptkontakt (P-90002)
postalAddress         “street”: “Bachstraße 553”,
        “zipcode”: “28195”,
        “city”: “Bremen”,
        “country”: “Germany”
officePhoneNumber +49 171 3920003
emailAddress info@fischer-pflege-gmbh.example.org
tradeName Fischer Pflege GmbH
registrationOffice Registergericht Bremen
registrationNumber 310659

Person: Hostsharing eG

HTTP GET "/api/hs/office/persons?name=Hostsharing+eG" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Hostsharing eG",
  "salutation" : null,
  "title" : null,
  "givenName" : null,
  "familyName" : null
} ]

Even in production data we expect this query to return just a single result.

Person: Fischer Pflege GmbH

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Fischer Pflege GmbH"
}
EOF
=> status: 201 CREATED 53aa8afe-771a-478c-8b4b-5ced959e1132

Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
  "postalAddress" : {
    "street" : "Bachstraße 553",
    "zipcode" : "28195",
    "city" : "Bremen",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 171 3920003"
  },
  "emailAddresses" : {
    "main" : "info@fischer-pflege-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED 18355b4c-20cc-4c07-ba88-0e0a58011467

Create Partner: P-90002 - Fischer Pflege GmbH

HTTP POST "/api/hs/office/partners" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "partnerNumber" : "P-90002",
  "partnerRel" : {
    "anchor.uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
    "holder.uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
    "contact.uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467" // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
  },
  "details" : {
    "registrationOffice" : "Registergericht Bremen",
    "registrationNumber" : "310659"
  }
}
EOF
=> status: 201 CREATED bf29c4f9-c2ac-4288-8643-05f7c5a3ceab

Verify the New Partner Relation

HTTP GET "/api/hs/office/relations?relationType=PARTNER&contactData=Fischer+Pflege+GmbH+-+Hauptkontakt+%28P-90002%29" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "35a17916-2e6c-4fd1-94f3-8c6826a064cc",
  "anchor" : {
    "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fischer Pflege GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467", // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
    "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
    "postalAddress" : {
      "zipcode" : "28195",
      "country" : "Germany",
      "city" : "Bremen",
      "street" : "Bachstraße 553"
    },
    "emailAddresses" : {
      "main" : "info@fischer-pflege-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 171 3920003"
    }
  }
} ]

UseCase Add Demo Relation => REPRESENTATIVE: Daniel Fischer - Vertretung (P-90002)

Properties

Given

name value
partnerPersonName Fischer Pflege GmbH
relationType REPRESENTATIVE
holderGivenName Daniel
holderFamilyName Fischer
contactCaption Daniel Fischer - Vertretung (P-90002)
postalAddress “name”: “Rechnungsstelle”,
        “street”: “Dorfstraße 882”,
        “zipcode”: “50667”,
        “city”: “Köln”,
        “country”: “Germany”
phoneNumber +49 221 4710601
emailAddress daniel-fischer@fischer-pflege-gmbh.example.org

Person: Daniel Fischer

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Fischer",
  "givenName" : "Daniel"
}
EOF
=> status: 201 CREATED 6579e7b0-90d3-42e3-8925-cd040d0b6908

Contact: Daniel Fischer - Vertretung (P-90002)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Daniel Fischer - Vertretung (P-90002)",
  "postalAddress" : {
    "name" : "Rechnungsstelle",
    "street" : "Dorfstraße 882",
    "zipcode" : "50667",
    "city" : "Köln",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 221 4710601"
  },
  "emailAddresses" : {
    "main" : "daniel-fischer@fischer-pflege-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED 1b45bc7d-bfa7-45ec-9711-47962b221e05

Create REPRESENTATIVE: Daniel Fischer - Vertretung (P-90002)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "REPRESENTATIVE",
  "anchor.uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
  "holder.uuid" : "6579e7b0-90d3-42e3-8925-cd040d0b6908", // Person: Daniel Fischer
  "contact.uuid" : "1b45bc7d-bfa7-45ec-9711-47962b221e05" // Contact: Daniel Fischer - Vertretung (P-90002)
}
EOF
=> status: 201 CREATED 5743bf7c-586c-47c4-a9bd-54b233d9fd3b

Verify the Relation Got Created

HTTP GET "/api/hs/office/relations/5743bf7c-586c-47c4-a9bd-54b233d9fd3b" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "5743bf7c-586c-47c4-a9bd-54b233d9fd3b",
  "anchor" : {
    "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fischer Pflege GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "6579e7b0-90d3-42e3-8925-cd040d0b6908", // Person: Daniel Fischer
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Daniel",
    "familyName" : "Fischer"
  },
  "type" : "REPRESENTATIVE",
  "mark" : null,
  "contact" : {
    "uuid" : "1b45bc7d-bfa7-45ec-9711-47962b221e05", // Contact: Daniel Fischer - Vertretung (P-90002)
    "caption" : "Daniel Fischer - Vertretung (P-90002)",
    "postalAddress" : {
      "zipcode" : "50667",
      "country" : "Germany",
      "city" : "Köln",
      "street" : "Dorfstraße 882",
      "name" : "Rechnungsstelle"
    },
    "emailAddresses" : {
      "main" : "daniel-fischer@fischer-pflege-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 221 4710601"
    }
  }
}

UseCase Add Demo Relation => OPERATIONS: Detlef Keller - Technik (P-90002)

Properties

Given

name value
partnerPersonName Fischer Pflege GmbH
relationType OPERATIONS
holderGivenName Detlef
holderFamilyName Keller
contactCaption Detlef Keller - Technik (P-90002)
postalAddress “name”: “Rechnungsstelle”,
        “street”: “Goethestraße 288”,
        “zipcode”: “53111”,
        “city”: “Bonn”,
        “country”: “Germany”
phoneNumber +49 171 3920098
emailAddress detlef-keller@fischer-pflege-gmbh.example.org

Person: Detlef Keller

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Keller",
  "givenName" : "Detlef"
}
EOF
=> status: 201 CREATED 3c2468cf-71d2-4616-ac6e-15f160a65104

Contact: Detlef Keller - Technik (P-90002)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Detlef Keller - Technik (P-90002)",
  "postalAddress" : {
    "name" : "Rechnungsstelle",
    "street" : "Goethestraße 288",
    "zipcode" : "53111",
    "city" : "Bonn",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 171 3920098"
  },
  "emailAddresses" : {
    "main" : "detlef-keller@fischer-pflege-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED fc6b0c86-fc62-4267-b168-342603b8f35c

Create OPERATIONS: Detlef Keller - Technik (P-90002)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "OPERATIONS",
  "anchor.uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
  "holder.uuid" : "3c2468cf-71d2-4616-ac6e-15f160a65104", // Person: Detlef Keller
  "contact.uuid" : "fc6b0c86-fc62-4267-b168-342603b8f35c" // Contact: Detlef Keller - Technik (P-90002)
}
EOF
=> status: 201 CREATED b1f2c228-7bf8-4c83-b2ea-16670f47c92e

Verify the Relation Got Created

HTTP GET "/api/hs/office/relations/b1f2c228-7bf8-4c83-b2ea-16670f47c92e" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "b1f2c228-7bf8-4c83-b2ea-16670f47c92e",
  "anchor" : {
    "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fischer Pflege GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "3c2468cf-71d2-4616-ac6e-15f160a65104", // Person: Detlef Keller
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Detlef",
    "familyName" : "Keller"
  },
  "type" : "OPERATIONS",
  "mark" : null,
  "contact" : {
    "uuid" : "fc6b0c86-fc62-4267-b168-342603b8f35c", // Contact: Detlef Keller - Technik (P-90002)
    "caption" : "Detlef Keller - Technik (P-90002)",
    "postalAddress" : {
      "zipcode" : "53111",
      "country" : "Germany",
      "city" : "Bonn",
      "street" : "Goethestraße 288",
      "name" : "Rechnungsstelle"
    },
    "emailAddresses" : {
      "main" : "detlef-keller@fischer-pflege-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 171 3920098"
    }
  }
}

UseCase Add Demo Relation => OPERATIONS: Doris Schneider - Technik (P-90002)

Properties

Given

name value
partnerPersonName Fischer Pflege GmbH
relationType OPERATIONS
holderGivenName Doris
holderFamilyName Schneider
contactCaption Doris Schneider - Technik (P-90002)
postalAddress         “street”: “Nelkenweg 142”,
        “zipcode”: “80331”,
        “city”: “München”,
        “country”: “Germany”
phoneNumber +49 89 99998458
emailAddress doris-schneider@fischer-pflege-gmbh.example.org

Person: Doris Schneider

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Schneider",
  "givenName" : "Doris"
}
EOF
=> status: 201 CREATED de6801e5-3245-4334-9817-4b36d339f3fa

Contact: Doris Schneider - Technik (P-90002)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Doris Schneider - Technik (P-90002)",
  "postalAddress" : {
    "street" : "Nelkenweg 142",
    "zipcode" : "80331",
    "city" : "München",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 89 99998458"
  },
  "emailAddresses" : {
    "main" : "doris-schneider@fischer-pflege-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED ad7a009e-976c-48db-8bd0-209e74d2598a

Create OPERATIONS: Doris Schneider - Technik (P-90002)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "OPERATIONS",
  "anchor.uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
  "holder.uuid" : "de6801e5-3245-4334-9817-4b36d339f3fa", // Person: Doris Schneider
  "contact.uuid" : "ad7a009e-976c-48db-8bd0-209e74d2598a" // Contact: Doris Schneider - Technik (P-90002)
}
EOF
=> status: 201 CREATED bfcc770d-d095-489a-9553-b94f24355cb7

Verify the Relation Got Created

HTTP GET "/api/hs/office/relations/bfcc770d-d095-489a-9553-b94f24355cb7" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "bfcc770d-d095-489a-9553-b94f24355cb7",
  "anchor" : {
    "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fischer Pflege GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "de6801e5-3245-4334-9817-4b36d339f3fa", // Person: Doris Schneider
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Doris",
    "familyName" : "Schneider"
  },
  "type" : "OPERATIONS",
  "mark" : null,
  "contact" : {
    "uuid" : "ad7a009e-976c-48db-8bd0-209e74d2598a", // Contact: Doris Schneider - Technik (P-90002)
    "caption" : "Doris Schneider - Technik (P-90002)",
    "postalAddress" : {
      "zipcode" : "80331",
      "country" : "Germany",
      "city" : "München",
      "street" : "Nelkenweg 142"
    },
    "emailAddresses" : {
      "main" : "doris-schneider@fischer-pflege-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 89 99998458"
    }
  }
}

UseCase Create Demo Debitor => Debitor: Fischer Pflege GmbH - Rechnungsstelle (D-9000200)

Properties

Given

name value
partnerPersonName Fischer Pflege GmbH
debitorNumberSuffix 00
billable true
vatBusiness false
defaultPrefix aac
bankAccountHolder Fischer Pflege GmbH (P-90002/0)
iban DE35990100000247429672
bic DEMSDEH0
billingContactCaption Fischer Pflege GmbH - Rechnungsstelle (D-9000200)
billingContactEmailAddress rechnung0@fischer-pflege-gmbh.example.org

BankAccount: Fischer Pflege GmbH (P-90002/0)

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "holder" : "Fischer Pflege GmbH (P-90002/0)",
  "iban" : "DE35990100000247429672",
  "bic" : "DEMSDEH0"
}
EOF
=> status: 201 CREATED d3dc0c26-5529-4ca4-b5ae-889f3cc057a4

Contact: Fischer Pflege GmbH - Rechnungsstelle (D-9000200)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Fischer Pflege GmbH - Rechnungsstelle (D-9000200)",
  "emailAddresses" : {
    "main" : "rechnung0@fischer-pflege-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED c460b253-bb58-4cc6-b1e5-cdb8f9eeb30c

Create Debitor: Fischer Pflege GmbH - Rechnungsstelle (D-9000200)

HTTP POST "/api/hs/office/debitors" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "debitorRel" : {
    "anchor.uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
    "holder.uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
    "contact.uuid" : "c460b253-bb58-4cc6-b1e5-cdb8f9eeb30c" // Contact: Fischer Pflege GmbH - Rechnungsstelle (D-9000200)
  },
  "debitorNumberSuffix" : "00",
  "billable" : true,
  "vatBusiness" : false,
  "vatReverseCharge" : false,
  "refundBankAccount.uuid" : "d3dc0c26-5529-4ca4-b5ae-889f3cc057a4", // BankAccount: Fischer Pflege GmbH (P-90002/0)
  "defaultPrefix" : "aac"
}
EOF
=> status: 201 CREATED 03cdc11d-c0e9-4476-8371-c741d3bcb9b8

Verify the Debitor Got Created

HTTP GET "/api/hs/office/debitors/03cdc11d-c0e9-4476-8371-c741d3bcb9b8" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "03cdc11d-c0e9-4476-8371-c741d3bcb9b8",
  "debitorRel" : {
    "uuid" : "087471be-4ba1-4bb7-a479-accca78f3d15",
    "anchor" : {
      "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fischer Pflege GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fischer Pflege GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "c460b253-bb58-4cc6-b1e5-cdb8f9eeb30c", // Contact: Fischer Pflege GmbH - Rechnungsstelle (D-9000200)
      "caption" : "Fischer Pflege GmbH - Rechnungsstelle (D-9000200)",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "rechnung0@fischer-pflege-gmbh.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-9000200",
  "debitorNumberSuffix" : "00",
  "partner" : {
    "uuid" : "bf29c4f9-c2ac-4288-8643-05f7c5a3ceab",
    "partnerNumber" : "P-90002",
    "partnerRel" : {
      "uuid" : "35a17916-2e6c-4fd1-94f3-8c6826a064cc",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fischer Pflege GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467", // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
        "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
        "postalAddress" : {
          "zipcode" : "28195",
          "country" : "Germany",
          "city" : "Bremen",
          "street" : "Bachstraße 553"
        },
        "emailAddresses" : {
          "main" : "info@fischer-pflege-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920003"
        }
      }
    },
    "details" : {
      "uuid" : "1b8725a0-62d5-4d15-b701-59166ccf7f03",
      "registrationOffice" : "Registergericht Bremen",
      "registrationNumber" : "310659",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : null,
  "vatCountryCode" : null,
  "vatBusiness" : false,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "d3dc0c26-5529-4ca4-b5ae-889f3cc057a4", // BankAccount: Fischer Pflege GmbH (P-90002/0)
    "holder" : "Fischer Pflege GmbH (P-90002/0)",
    "iban" : "DE35990100000247429672",
    "bic" : "DEMSDEH0"
  },
  "defaultPrefix" : "aac"
}

UseCase Create Demo Sepa Mandate => SEPA-Mandat: D-9000200-aktuell

Properties

Given

name value
debitorNumber D-9000200
mandateReference D-9000200-aktuell
bankAccountHolder Fischer Pflege GmbH (P-90002/0/aktuell)
iban DE76990100000045503743
bic DEMSDEH0
agreement 2013-05-03
validFrom 2013-05-17

Debitor of D-9000200-aktuell

HTTP GET "/api/hs/office/debitors/D-9000200" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "03cdc11d-c0e9-4476-8371-c741d3bcb9b8",
  "debitorRel" : {
    "uuid" : "087471be-4ba1-4bb7-a479-accca78f3d15",
    "anchor" : {
      "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fischer Pflege GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fischer Pflege GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "c460b253-bb58-4cc6-b1e5-cdb8f9eeb30c", // Contact: Fischer Pflege GmbH - Rechnungsstelle (D-9000200)
      "caption" : "Fischer Pflege GmbH - Rechnungsstelle (D-9000200)",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "rechnung0@fischer-pflege-gmbh.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-9000200",
  "debitorNumberSuffix" : "00",
  "partner" : {
    "uuid" : "bf29c4f9-c2ac-4288-8643-05f7c5a3ceab",
    "partnerNumber" : "P-90002",
    "partnerRel" : {
      "uuid" : "35a17916-2e6c-4fd1-94f3-8c6826a064cc",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fischer Pflege GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467", // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
        "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
        "postalAddress" : {
          "zipcode" : "28195",
          "country" : "Germany",
          "city" : "Bremen",
          "street" : "Bachstraße 553"
        },
        "emailAddresses" : {
          "main" : "info@fischer-pflege-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920003"
        }
      }
    },
    "details" : {
      "uuid" : "1b8725a0-62d5-4d15-b701-59166ccf7f03",
      "registrationOffice" : "Registergericht Bremen",
      "registrationNumber" : "310659",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : null,
  "vatCountryCode" : null,
  "vatBusiness" : false,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "d3dc0c26-5529-4ca4-b5ae-889f3cc057a4", // BankAccount: Fischer Pflege GmbH (P-90002/0)
    "holder" : "Fischer Pflege GmbH (P-90002/0)",
    "iban" : "DE35990100000247429672",
    "bic" : "DEMSDEH0"
  },
  "defaultPrefix" : "aac"
}

BankAccount: Fischer Pflege GmbH (P-90002/0/aktuell)

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "holder" : "Fischer Pflege GmbH (P-90002/0/aktuell)",
  "iban" : "DE76990100000045503743",
  "bic" : "DEMSDEH0"
}
EOF
=> status: 201 CREATED 82add9f4-2232-439d-9ecc-9b9ef06d2bae

Create SEPA-Mandat: D-9000200-aktuell

HTTP POST "/api/hs/office/sepamandates" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "debitor.uuid" : "03cdc11d-c0e9-4476-8371-c741d3bcb9b8", // Debitor of D-9000200-aktuell
  "bankAccount.uuid" : "82add9f4-2232-439d-9ecc-9b9ef06d2bae", // BankAccount: Fischer Pflege GmbH (P-90002/0/aktuell)
  "reference" : "D-9000200-aktuell",
  "agreement" : "2013-05-03",
  "validFrom" : "2013-05-17"
}
EOF
=> status: 201 CREATED accb8d54-8f8c-482b-8feb-aec45984bb61

Verify the SEPA-Mandate Got Created

HTTP GET "/api/hs/office/sepamandates/accb8d54-8f8c-482b-8feb-aec45984bb61" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "accb8d54-8f8c-482b-8feb-aec45984bb61",
  "debitor" : {
    "uuid" : "03cdc11d-c0e9-4476-8371-c741d3bcb9b8", // Debitor of D-9000200-aktuell
    "debitorRel" : {
      "uuid" : "087471be-4ba1-4bb7-a479-accca78f3d15",
      "anchor" : {
        "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fischer Pflege GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fischer Pflege GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "DEBITOR",
      "mark" : null,
      "contact" : {
        "uuid" : "c460b253-bb58-4cc6-b1e5-cdb8f9eeb30c", // Contact: Fischer Pflege GmbH - Rechnungsstelle (D-9000200)
        "caption" : "Fischer Pflege GmbH - Rechnungsstelle (D-9000200)",
        "postalAddress" : { },
        "emailAddresses" : {
          "main" : "rechnung0@fischer-pflege-gmbh.example.org"
        },
        "phoneNumbers" : { }
      }
    },
    "debitorNumber" : "D-9000200",
    "debitorNumberSuffix" : "00",
    "partner" : {
      "uuid" : "bf29c4f9-c2ac-4288-8643-05f7c5a3ceab",
      "partnerNumber" : "P-90002",
      "partnerRel" : {
        "uuid" : "35a17916-2e6c-4fd1-94f3-8c6826a064cc",
        "anchor" : {
          "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Hostsharing eG",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "holder" : {
          "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Fischer Pflege GmbH",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "type" : "PARTNER",
        "mark" : null,
        "contact" : {
          "uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467", // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
          "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
          "postalAddress" : {
            "zipcode" : "28195",
            "country" : "Germany",
            "city" : "Bremen",
            "street" : "Bachstraße 553"
          },
          "emailAddresses" : {
            "main" : "info@fischer-pflege-gmbh.example.org"
          },
          "phoneNumbers" : {
            "office" : "+49 171 3920003"
          }
        }
      },
      "details" : {
        "uuid" : "1b8725a0-62d5-4d15-b701-59166ccf7f03",
        "registrationOffice" : "Registergericht Bremen",
        "registrationNumber" : "310659",
        "birthName" : null,
        "birthPlace" : null,
        "birthday" : null,
        "dateOfDeath" : null
      }
    },
    "billable" : true,
    "vatId" : null,
    "vatCountryCode" : null,
    "vatBusiness" : false,
    "vatReverseCharge" : false,
    "refundBankAccount" : {
      "uuid" : "d3dc0c26-5529-4ca4-b5ae-889f3cc057a4", // BankAccount: Fischer Pflege GmbH (P-90002/0)
      "holder" : "Fischer Pflege GmbH (P-90002/0)",
      "iban" : "DE35990100000247429672",
      "bic" : "DEMSDEH0"
    },
    "defaultPrefix" : "aac"
  },
  "bankAccount" : {
    "uuid" : "82add9f4-2232-439d-9ecc-9b9ef06d2bae", // BankAccount: Fischer Pflege GmbH (P-90002/0/aktuell)
    "holder" : "Fischer Pflege GmbH (P-90002/0/aktuell)",
    "iban" : "DE76990100000045503743",
    "bic" : "DEMSDEH0"
  },
  "reference" : "D-9000200-aktuell",
  "agreement" : "2013-05-03",
  "validFrom" : "2013-05-17",
  "validTo" : null
}

UseCase Create Demo Debitor => Debitor: Fischer Pflege GmbH - Rechnungsstelle (D-9000201)

Properties

Given

name value
partnerPersonName Fischer Pflege GmbH
debitorNumberSuffix 01
billable true
vatBusiness true
defaultPrefix aad
bankAccountHolder Fischer Pflege GmbH (P-90002/1)
iban DE44990100000597317337
bic DEMSDEH0
billingContactCaption Fischer Pflege GmbH - Rechnungsstelle (D-9000201)
billingContactEmailAddress rechnung1@fischer-pflege-gmbh.example.org

BankAccount: Fischer Pflege GmbH (P-90002/1)

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "holder" : "Fischer Pflege GmbH (P-90002/1)",
  "iban" : "DE44990100000597317337",
  "bic" : "DEMSDEH0"
}
EOF
=> status: 201 CREATED b84b4b99-0506-42be-90e2-2bf2235b8afa

Contact: Fischer Pflege GmbH - Rechnungsstelle (D-9000201)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Fischer Pflege GmbH - Rechnungsstelle (D-9000201)",
  "emailAddresses" : {
    "main" : "rechnung1@fischer-pflege-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED a3453666-a301-41d5-b1a9-170ad69191e1

Create Debitor: Fischer Pflege GmbH - Rechnungsstelle (D-9000201)

HTTP POST "/api/hs/office/debitors" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "debitorRel" : {
    "anchor.uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
    "holder.uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
    "contact.uuid" : "a3453666-a301-41d5-b1a9-170ad69191e1" // Contact: Fischer Pflege GmbH - Rechnungsstelle (D-9000201)
  },
  "debitorNumberSuffix" : "01",
  "billable" : true,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount.uuid" : "b84b4b99-0506-42be-90e2-2bf2235b8afa", // BankAccount: Fischer Pflege GmbH (P-90002/1)
  "defaultPrefix" : "aad"
}
EOF
=> status: 201 CREATED 0aa31d0a-ecfb-42d1-9533-d148ce17f4ad

Verify the Debitor Got Created

HTTP GET "/api/hs/office/debitors/0aa31d0a-ecfb-42d1-9533-d148ce17f4ad" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "0aa31d0a-ecfb-42d1-9533-d148ce17f4ad",
  "debitorRel" : {
    "uuid" : "0e2bcbb6-0678-4f78-8d83-988c8be30f70",
    "anchor" : {
      "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fischer Pflege GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fischer Pflege GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "a3453666-a301-41d5-b1a9-170ad69191e1", // Contact: Fischer Pflege GmbH - Rechnungsstelle (D-9000201)
      "caption" : "Fischer Pflege GmbH - Rechnungsstelle (D-9000201)",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "rechnung1@fischer-pflege-gmbh.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-9000201",
  "debitorNumberSuffix" : "01",
  "partner" : {
    "uuid" : "bf29c4f9-c2ac-4288-8643-05f7c5a3ceab",
    "partnerNumber" : "P-90002",
    "partnerRel" : {
      "uuid" : "35a17916-2e6c-4fd1-94f3-8c6826a064cc",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fischer Pflege GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467", // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
        "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
        "postalAddress" : {
          "zipcode" : "28195",
          "country" : "Germany",
          "city" : "Bremen",
          "street" : "Bachstraße 553"
        },
        "emailAddresses" : {
          "main" : "info@fischer-pflege-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920003"
        }
      }
    },
    "details" : {
      "uuid" : "1b8725a0-62d5-4d15-b701-59166ccf7f03",
      "registrationOffice" : "Registergericht Bremen",
      "registrationNumber" : "310659",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : null,
  "vatCountryCode" : null,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "b84b4b99-0506-42be-90e2-2bf2235b8afa", // BankAccount: Fischer Pflege GmbH (P-90002/1)
    "holder" : "Fischer Pflege GmbH (P-90002/1)",
    "iban" : "DE44990100000597317337",
    "bic" : "DEMSDEH0"
  },
  "defaultPrefix" : "aad"
}

UseCase Create Demo Sepa Mandate => SEPA-Mandat: D-9000201-aktuell

Properties

Given

name value
debitorNumber D-9000201
mandateReference D-9000201-aktuell
bankAccountHolder Fischer Pflege GmbH (P-90002/1/aktuell)
iban DE41990100000935066832
bic DEMSDEH0
agreement 2020-07-10
validFrom 2020-07-14

Debitor of D-9000201-aktuell

HTTP GET "/api/hs/office/debitors/D-9000201" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "0aa31d0a-ecfb-42d1-9533-d148ce17f4ad",
  "debitorRel" : {
    "uuid" : "0e2bcbb6-0678-4f78-8d83-988c8be30f70",
    "anchor" : {
      "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fischer Pflege GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fischer Pflege GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "a3453666-a301-41d5-b1a9-170ad69191e1", // Contact: Fischer Pflege GmbH - Rechnungsstelle (D-9000201)
      "caption" : "Fischer Pflege GmbH - Rechnungsstelle (D-9000201)",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "rechnung1@fischer-pflege-gmbh.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-9000201",
  "debitorNumberSuffix" : "01",
  "partner" : {
    "uuid" : "bf29c4f9-c2ac-4288-8643-05f7c5a3ceab",
    "partnerNumber" : "P-90002",
    "partnerRel" : {
      "uuid" : "35a17916-2e6c-4fd1-94f3-8c6826a064cc",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fischer Pflege GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467", // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
        "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
        "postalAddress" : {
          "zipcode" : "28195",
          "country" : "Germany",
          "city" : "Bremen",
          "street" : "Bachstraße 553"
        },
        "emailAddresses" : {
          "main" : "info@fischer-pflege-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920003"
        }
      }
    },
    "details" : {
      "uuid" : "1b8725a0-62d5-4d15-b701-59166ccf7f03",
      "registrationOffice" : "Registergericht Bremen",
      "registrationNumber" : "310659",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : null,
  "vatCountryCode" : null,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "b84b4b99-0506-42be-90e2-2bf2235b8afa", // BankAccount: Fischer Pflege GmbH (P-90002/1)
    "holder" : "Fischer Pflege GmbH (P-90002/1)",
    "iban" : "DE44990100000597317337",
    "bic" : "DEMSDEH0"
  },
  "defaultPrefix" : "aad"
}

BankAccount: Fischer Pflege GmbH (P-90002/1/aktuell)

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "holder" : "Fischer Pflege GmbH (P-90002/1/aktuell)",
  "iban" : "DE41990100000935066832",
  "bic" : "DEMSDEH0"
}
EOF
=> status: 201 CREATED 2f1efda9-15f4-4ef4-b236-fd3eddcbbcd5

Create SEPA-Mandat: D-9000201-aktuell

HTTP POST "/api/hs/office/sepamandates" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "debitor.uuid" : "0aa31d0a-ecfb-42d1-9533-d148ce17f4ad", // Debitor of D-9000201-aktuell
  "bankAccount.uuid" : "2f1efda9-15f4-4ef4-b236-fd3eddcbbcd5", // BankAccount: Fischer Pflege GmbH (P-90002/1/aktuell)
  "reference" : "D-9000201-aktuell",
  "agreement" : "2020-07-10",
  "validFrom" : "2020-07-14"
}
EOF
=> status: 201 CREATED 915cc015-ba90-47aa-ab01-15936c7988be

Verify the SEPA-Mandate Got Created

HTTP GET "/api/hs/office/sepamandates/915cc015-ba90-47aa-ab01-15936c7988be" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "915cc015-ba90-47aa-ab01-15936c7988be",
  "debitor" : {
    "uuid" : "0aa31d0a-ecfb-42d1-9533-d148ce17f4ad", // Debitor of D-9000201-aktuell
    "debitorRel" : {
      "uuid" : "0e2bcbb6-0678-4f78-8d83-988c8be30f70",
      "anchor" : {
        "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fischer Pflege GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fischer Pflege GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "DEBITOR",
      "mark" : null,
      "contact" : {
        "uuid" : "a3453666-a301-41d5-b1a9-170ad69191e1", // Contact: Fischer Pflege GmbH - Rechnungsstelle (D-9000201)
        "caption" : "Fischer Pflege GmbH - Rechnungsstelle (D-9000201)",
        "postalAddress" : { },
        "emailAddresses" : {
          "main" : "rechnung1@fischer-pflege-gmbh.example.org"
        },
        "phoneNumbers" : { }
      }
    },
    "debitorNumber" : "D-9000201",
    "debitorNumberSuffix" : "01",
    "partner" : {
      "uuid" : "bf29c4f9-c2ac-4288-8643-05f7c5a3ceab",
      "partnerNumber" : "P-90002",
      "partnerRel" : {
        "uuid" : "35a17916-2e6c-4fd1-94f3-8c6826a064cc",
        "anchor" : {
          "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Hostsharing eG",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "holder" : {
          "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Fischer Pflege GmbH",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "type" : "PARTNER",
        "mark" : null,
        "contact" : {
          "uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467", // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
          "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
          "postalAddress" : {
            "zipcode" : "28195",
            "country" : "Germany",
            "city" : "Bremen",
            "street" : "Bachstraße 553"
          },
          "emailAddresses" : {
            "main" : "info@fischer-pflege-gmbh.example.org"
          },
          "phoneNumbers" : {
            "office" : "+49 171 3920003"
          }
        }
      },
      "details" : {
        "uuid" : "1b8725a0-62d5-4d15-b701-59166ccf7f03",
        "registrationOffice" : "Registergericht Bremen",
        "registrationNumber" : "310659",
        "birthName" : null,
        "birthPlace" : null,
        "birthday" : null,
        "dateOfDeath" : null
      }
    },
    "billable" : true,
    "vatId" : null,
    "vatCountryCode" : null,
    "vatBusiness" : true,
    "vatReverseCharge" : false,
    "refundBankAccount" : {
      "uuid" : "b84b4b99-0506-42be-90e2-2bf2235b8afa", // BankAccount: Fischer Pflege GmbH (P-90002/1)
      "holder" : "Fischer Pflege GmbH (P-90002/1)",
      "iban" : "DE44990100000597317337",
      "bic" : "DEMSDEH0"
    },
    "defaultPrefix" : "aad"
  },
  "bankAccount" : {
    "uuid" : "2f1efda9-15f4-4ef4-b236-fd3eddcbbcd5", // BankAccount: Fischer Pflege GmbH (P-90002/1/aktuell)
    "holder" : "Fischer Pflege GmbH (P-90002/1/aktuell)",
    "iban" : "DE41990100000935066832",
    "bic" : "DEMSDEH0"
  },
  "reference" : "D-9000201-aktuell",
  "agreement" : "2020-07-10",
  "validFrom" : "2020-07-14",
  "validTo" : null
}

UseCase Create Membership => Membership: Fischer Pflege GmbH

Properties

Given

name value
partnerNumber P-90002
validFrom 2010-07-10
membershipFeeBillable true

Partner: P-90002

HTTP GET "/api/hs/office/partners/P-90002" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "bf29c4f9-c2ac-4288-8643-05f7c5a3ceab",
  "partnerNumber" : "P-90002",
  "partnerRel" : {
    "uuid" : "35a17916-2e6c-4fd1-94f3-8c6826a064cc",
    "anchor" : {
      "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Hostsharing eG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fischer Pflege GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "PARTNER",
    "mark" : null,
    "contact" : {
      "uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467", // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
      "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
      "postalAddress" : {
        "zipcode" : "28195",
        "country" : "Germany",
        "city" : "Bremen",
        "street" : "Bachstraße 553"
      },
      "emailAddresses" : {
        "main" : "info@fischer-pflege-gmbh.example.org"
      },
      "phoneNumbers" : {
        "office" : "+49 171 3920003"
      }
    }
  },
  "details" : {
    "uuid" : "1b8725a0-62d5-4d15-b701-59166ccf7f03",
    "registrationOffice" : "Registergericht Bremen",
    "registrationNumber" : "310659",
    "birthName" : null,
    "birthPlace" : null,
    "birthday" : null,
    "dateOfDeath" : null
  }
}

The partner-number identifies the partner; a lookup by name could not, because a natural person carries its name in two columns and any name can be the prefix of a longer one.

Create Membership: Fischer Pflege GmbH

HTTP POST "/api/hs/office/memberships" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "partner.uuid" : "bf29c4f9-c2ac-4288-8643-05f7c5a3ceab", // Partner: P-90002
  "memberNumberSuffix" : "00",
  "status" : "ACTIVE",
  "validFrom" : "2010-07-10",
  "membershipFeeBillable" : true
}
EOF
=> status: 201 CREATED 22136d9f-e83e-4231-a674-e6ec22de4a49

Verify That the Membership Got Created

HTTP GET "/api/hs/office/memberships/22136d9f-e83e-4231-a674-e6ec22de4a49" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "22136d9f-e83e-4231-a674-e6ec22de4a49",
  "partner" : {
    "uuid" : "bf29c4f9-c2ac-4288-8643-05f7c5a3ceab", // Partner: P-90002
    "partnerNumber" : "P-90002",
    "partnerRel" : {
      "uuid" : "35a17916-2e6c-4fd1-94f3-8c6826a064cc",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fischer Pflege GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467", // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
        "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
        "postalAddress" : {
          "zipcode" : "28195",
          "country" : "Germany",
          "city" : "Bremen",
          "street" : "Bachstraße 553"
        },
        "emailAddresses" : {
          "main" : "info@fischer-pflege-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920003"
        }
      }
    },
    "details" : {
      "uuid" : "1b8725a0-62d5-4d15-b701-59166ccf7f03",
      "registrationOffice" : "Registergericht Bremen",
      "registrationNumber" : "310659",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000200",
  "memberNumberSuffix" : "00",
  "validFrom" : "2010-07-10",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Properties

Given

name value
transactionType SUBSCRIPTION
memberNumber M-9000200
reference sign 2010-07-10
shareCount 35
comment initial shares on joining
transactionDate 2010-07-10

Find membershipUuid

HTTP GET "/api/hs/office/memberships/M-9000200" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "22136d9f-e83e-4231-a674-e6ec22de4a49",
  "partner" : {
    "uuid" : "bf29c4f9-c2ac-4288-8643-05f7c5a3ceab", // Partner: P-90002
    "partnerNumber" : "P-90002",
    "partnerRel" : {
      "uuid" : "35a17916-2e6c-4fd1-94f3-8c6826a064cc",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fischer Pflege GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467", // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
        "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
        "postalAddress" : {
          "zipcode" : "28195",
          "country" : "Germany",
          "city" : "Bremen",
          "street" : "Bachstraße 553"
        },
        "emailAddresses" : {
          "main" : "info@fischer-pflege-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920003"
        }
      }
    },
    "details" : {
      "uuid" : "1b8725a0-62d5-4d15-b701-59166ccf7f03",
      "registrationOffice" : "Registergericht Bremen",
      "registrationNumber" : "310659",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000200",
  "memberNumberSuffix" : "00",
  "validFrom" : "2010-07-10",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Create the Coop-Shares-SUBSCRIPTION Transaction

HTTP POST "/api/hs/office/coopsharestransactions" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "membership.uuid" : "22136d9f-e83e-4231-a674-e6ec22de4a49", // membershipUuid
  "transactionType" : "SUBSCRIPTION",
  "reference" : "sign 2010-07-10",
  "shareCount" : 35,
  "comment" : "initial shares on joining",
  "valueDate" : "2010-07-10"
}
EOF
=> status: 201 CREATED 4b061f32-037e-41c5-9039-779b95cec32b

Verify Coop-Shares SUBSCRIPTION-Transaction

HTTP GET "/api/hs/office/coopsharestransactions/4b061f32-037e-41c5-9039-779b95cec32b" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "4b061f32-037e-41c5-9039-779b95cec32b",
  "membership.uuid" : "22136d9f-e83e-4231-a674-e6ec22de4a49", // membershipUuid
  "transactionType" : "SUBSCRIPTION",
  "shareCount" : 35,
  "valueDate" : "2010-07-10",
  "reference" : "sign 2010-07-10",
  "comment" : "initial shares on joining",
  "revertedShareTx" : null,
  "reversalShareTx" : null
}

Properties

Given

name value
transactionType DEPOSIT
memberNumber M-9000200
reference sign 2010-07-10
assetValue 2240
comment deposit for initial shares
transactionDate 2010-07-11

Find membershipUuid

HTTP GET "/api/hs/office/memberships/M-9000200" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "22136d9f-e83e-4231-a674-e6ec22de4a49", // membershipUuid
  "partner" : {
    "uuid" : "bf29c4f9-c2ac-4288-8643-05f7c5a3ceab", // Partner: P-90002
    "partnerNumber" : "P-90002",
    "partnerRel" : {
      "uuid" : "35a17916-2e6c-4fd1-94f3-8c6826a064cc",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fischer Pflege GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "18355b4c-20cc-4c07-ba88-0e0a58011467", // Contact: Fischer Pflege GmbH - Hauptkontakt (P-90002)
        "caption" : "Fischer Pflege GmbH - Hauptkontakt (P-90002)",
        "postalAddress" : {
          "zipcode" : "28195",
          "country" : "Germany",
          "city" : "Bremen",
          "street" : "Bachstraße 553"
        },
        "emailAddresses" : {
          "main" : "info@fischer-pflege-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920003"
        }
      }
    },
    "details" : {
      "uuid" : "1b8725a0-62d5-4d15-b701-59166ccf7f03",
      "registrationOffice" : "Registergericht Bremen",
      "registrationNumber" : "310659",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000200",
  "memberNumberSuffix" : "00",
  "validFrom" : "2010-07-10",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Create the Coop-Assets-DEPOSIT Transaction

HTTP POST "/api/hs/office/coopassetstransactions" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "membership.uuid" : "22136d9f-e83e-4231-a674-e6ec22de4a49", // membershipUuid
  "transactionType" : "DEPOSIT",
  "reference" : "sign 2010-07-10",
  "assetValue" : 2240,
  "comment" : "deposit for initial shares",
  "valueDate" : "2010-07-11"
}
EOF
=> status: 201 CREATED dce3ce25-77d3-48e2-8f5c-63ba2441aa58

Verify Coop-Assets DEPOSIT-Transaction

HTTP GET "/api/hs/office/coopassetstransactions/dce3ce25-77d3-48e2-8f5c-63ba2441aa58" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "dce3ce25-77d3-48e2-8f5c-63ba2441aa58",
  "membership.uuid" : "22136d9f-e83e-4231-a674-e6ec22de4a49", // membershipUuid
  "membership.memberNumber" : "M-9000200",
  "transactionType" : "DEPOSIT",
  "assetValue" : 2.24E+3,
  "valueDate" : "2010-07-11",
  "reference" : "sign 2010-07-10",
  "comment" : "deposit for initial shares",
  "adoptionAssetTx" : null,
  "transferAssetTx" : null,
  "revertedAssetTx" : null,
  "reversalAssetTx" : null
}

Contact: Daniel Fischer - private Mailinglisten-Adresse

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Daniel Fischer - private Mailinglisten-Adresse",
  "postalAddress" : {
    "street" : "Erlenkamp 678",
    "zipcode" : "70173",
    "city" : "Stuttgart",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "main" : "+49 176 04069030"
  },
  "emailAddresses" : {
    "main" : "daniel-fischer@example.net"
  }
}
EOF
=> status: 201 CREATED 96e4a889-2190-4d5f-9262-5684b2bbe6f8

UseCase Add Demo Subscription => SUBSCRIBER members-announce: Daniel Fischer (P-90002)

Properties

Given

name value
partnerPersonName Fischer Pflege GmbH
mailingList members-announce
holderGivenName Daniel
holderFamilyName Fischer
contactCaption Daniel Fischer - private Mailinglisten-Adresse

Create SUBSCRIBER members-announce: Daniel Fischer (P-90002)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "members-announce",
  "anchor.uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
  "holder.uuid" : "6579e7b0-90d3-42e3-8925-cd040d0b6908", // Person: Daniel Fischer
  "contact.uuid" : "96e4a889-2190-4d5f-9262-5684b2bbe6f8" // Contact: Daniel Fischer - private Mailinglisten-Adresse
}
EOF
=> status: 201 CREATED 73bc8e75-b087-4fd2-9a8a-73765298079b

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/73bc8e75-b087-4fd2-9a8a-73765298079b" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "73bc8e75-b087-4fd2-9a8a-73765298079b",
  "anchor" : {
    "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fischer Pflege GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "6579e7b0-90d3-42e3-8925-cd040d0b6908", // Person: Daniel Fischer
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Daniel",
    "familyName" : "Fischer"
  },
  "type" : "SUBSCRIBER",
  "mark" : "members-announce",
  "contact" : {
    "uuid" : "96e4a889-2190-4d5f-9262-5684b2bbe6f8", // Contact: Daniel Fischer - private Mailinglisten-Adresse
    "caption" : "Daniel Fischer - private Mailinglisten-Adresse",
    "postalAddress" : {
      "zipcode" : "70173",
      "country" : "Germany",
      "city" : "Stuttgart",
      "street" : "Erlenkamp 678"
    },
    "emailAddresses" : {
      "main" : "daniel-fischer@example.net"
    },
    "phoneNumbers" : {
      "main" : "+49 176 04069030"
    }
  }
}

UseCase Add Demo Subscription => SUBSCRIBER customers-announce: Daniel Fischer (P-90002)

Properties

Given

name value
partnerPersonName Fischer Pflege GmbH
mailingList customers-announce
holderGivenName Daniel
holderFamilyName Fischer
contactCaption Daniel Fischer - private Mailinglisten-Adresse

Create SUBSCRIBER customers-announce: Daniel Fischer (P-90002)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "customers-announce",
  "anchor.uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
  "holder.uuid" : "6579e7b0-90d3-42e3-8925-cd040d0b6908", // Person: Daniel Fischer
  "contact.uuid" : "96e4a889-2190-4d5f-9262-5684b2bbe6f8" // Contact: Daniel Fischer - private Mailinglisten-Adresse
}
EOF
=> status: 201 CREATED 6ca30a2c-189e-438c-ac26-ef0b3e6ad369

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/6ca30a2c-189e-438c-ac26-ef0b3e6ad369" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "6ca30a2c-189e-438c-ac26-ef0b3e6ad369",
  "anchor" : {
    "uuid" : "53aa8afe-771a-478c-8b4b-5ced959e1132", // Person: Fischer Pflege GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fischer Pflege GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "6579e7b0-90d3-42e3-8925-cd040d0b6908", // Person: Daniel Fischer
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Daniel",
    "familyName" : "Fischer"
  },
  "type" : "SUBSCRIBER",
  "mark" : "customers-announce",
  "contact" : {
    "uuid" : "96e4a889-2190-4d5f-9262-5684b2bbe6f8", // Contact: Daniel Fischer - private Mailinglisten-Adresse
    "caption" : "Daniel Fischer - private Mailinglisten-Adresse",
    "postalAddress" : {
      "zipcode" : "70173",
      "country" : "Germany",
      "city" : "Stuttgart",
      "street" : "Erlenkamp 678"
    },
    "emailAddresses" : {
      "main" : "daniel-fischer@example.net"
    },
    "phoneNumbers" : {
      "main" : "+49 176 04069030"
    }
  }
}

UseCase Create Partner => Partner: P-90003 - Fuchs GmbH

Properties

Given

name value
partnerNumber P-90003
personType LEGAL_PERSON
contactCaption Fuchs GmbH - Hauptkontakt (P-90003)
postalAddress “name”: “Rechnungsstelle”,
        “street”: “Bachstraße 290”,
        “zipcode”: “80331”,
        “city”: “München”,
        “country”: “Germany”
officePhoneNumber +49 89 99998009
emailAddress info@fuchs-gmbh.example.org
tradeName Fuchs GmbH
registrationOffice Registergericht München
registrationNumber 322619

Person: Hostsharing eG

HTTP GET "/api/hs/office/persons?name=Hostsharing+eG" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Hostsharing eG",
  "salutation" : null,
  "title" : null,
  "givenName" : null,
  "familyName" : null
} ]

Even in production data we expect this query to return just a single result.

Person: Fuchs GmbH

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Fuchs GmbH"
}
EOF
=> status: 201 CREATED ac062447-bb87-4bc2-9071-7d3ea1660fe2

Contact: Fuchs GmbH - Hauptkontakt (P-90003)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Fuchs GmbH - Hauptkontakt (P-90003)",
  "postalAddress" : {
    "name" : "Rechnungsstelle",
    "street" : "Bachstraße 290",
    "zipcode" : "80331",
    "city" : "München",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 89 99998009"
  },
  "emailAddresses" : {
    "main" : "info@fuchs-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED 8c16ea2f-ace7-44a8-b9c9-fac2b7065860

Create Partner: P-90003 - Fuchs GmbH

HTTP POST "/api/hs/office/partners" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "partnerNumber" : "P-90003",
  "partnerRel" : {
    "anchor.uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
    "holder.uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
    "contact.uuid" : "8c16ea2f-ace7-44a8-b9c9-fac2b7065860" // Contact: Fuchs GmbH - Hauptkontakt (P-90003)
  },
  "details" : {
    "registrationOffice" : "Registergericht München",
    "registrationNumber" : "322619"
  }
}
EOF
=> status: 201 CREATED d8ddb167-e0c7-4e8e-b5e4-7df24c393a6a

Verify the New Partner Relation

HTTP GET "/api/hs/office/relations?relationType=PARTNER&contactData=Fuchs+GmbH+-+Hauptkontakt+%28P-90003%29" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "f82402ed-cd98-48fb-8f4c-7676f7b4e828",
  "anchor" : {
    "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fuchs GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "8c16ea2f-ace7-44a8-b9c9-fac2b7065860", // Contact: Fuchs GmbH - Hauptkontakt (P-90003)
    "caption" : "Fuchs GmbH - Hauptkontakt (P-90003)",
    "postalAddress" : {
      "zipcode" : "80331",
      "country" : "Germany",
      "city" : "München",
      "street" : "Bachstraße 290",
      "name" : "Rechnungsstelle"
    },
    "emailAddresses" : {
      "main" : "info@fuchs-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 89 99998009"
    }
  }
} ]

UseCase Add Demo Relation => REPRESENTATIVE: Christian Fuchs - Vertretung (P-90003)

Properties

Given

name value
partnerPersonName Fuchs GmbH
relationType REPRESENTATIVE
holderGivenName Christian
holderFamilyName Fuchs
contactCaption Christian Fuchs - Vertretung (P-90003)
postalAddress         “street”: “Heideweg 441”,
        “zipcode”: “10115”,
        “city”: “Berlin”,
        “country”: “Germany”
phoneNumber +49 30 23125540
emailAddress christian-fuchs@fuchs-gmbh.example.org

Person: Christian Fuchs

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Fuchs",
  "givenName" : "Christian"
}
EOF
=> status: 201 CREATED 5a17bed8-f4d6-49ac-943b-0946a704d9f3

Contact: Christian Fuchs - Vertretung (P-90003)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Christian Fuchs - Vertretung (P-90003)",
  "postalAddress" : {
    "street" : "Heideweg 441",
    "zipcode" : "10115",
    "city" : "Berlin",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 30 23125540"
  },
  "emailAddresses" : {
    "main" : "christian-fuchs@fuchs-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED 2fadb5ea-3ee7-466d-8a51-f8a2312a0836

Create REPRESENTATIVE: Christian Fuchs - Vertretung (P-90003)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "REPRESENTATIVE",
  "anchor.uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
  "holder.uuid" : "5a17bed8-f4d6-49ac-943b-0946a704d9f3", // Person: Christian Fuchs
  "contact.uuid" : "2fadb5ea-3ee7-466d-8a51-f8a2312a0836" // Contact: Christian Fuchs - Vertretung (P-90003)
}
EOF
=> status: 201 CREATED e46e0526-3332-4e97-8a59-1352a986c137

Verify the Relation Got Created

HTTP GET "/api/hs/office/relations/e46e0526-3332-4e97-8a59-1352a986c137" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "e46e0526-3332-4e97-8a59-1352a986c137",
  "anchor" : {
    "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fuchs GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "5a17bed8-f4d6-49ac-943b-0946a704d9f3", // Person: Christian Fuchs
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Christian",
    "familyName" : "Fuchs"
  },
  "type" : "REPRESENTATIVE",
  "mark" : null,
  "contact" : {
    "uuid" : "2fadb5ea-3ee7-466d-8a51-f8a2312a0836", // Contact: Christian Fuchs - Vertretung (P-90003)
    "caption" : "Christian Fuchs - Vertretung (P-90003)",
    "postalAddress" : {
      "zipcode" : "10115",
      "country" : "Germany",
      "city" : "Berlin",
      "street" : "Heideweg 441"
    },
    "emailAddresses" : {
      "main" : "christian-fuchs@fuchs-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 30 23125540"
    }
  }
}

UseCase Add Demo Relation => OPERATIONS: Gabriele Meyer - Technik (P-90003)

Properties

Given

name value
partnerPersonName Fuchs GmbH
relationType OPERATIONS
holderGivenName Gabriele
holderFamilyName Meyer
contactCaption Gabriele Meyer - Technik (P-90003)
postalAddress         “street”: “Wiesengrund 118”,
        “zipcode”: “28195”,
        “city”: “Bremen”,
        “country”: “Germany”
phoneNumber +49 171 3920029
emailAddress gabriele-meyer@fuchs-gmbh.example.org

Person: Gabriele Meyer

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Meyer",
  "givenName" : "Gabriele"
}
EOF
=> status: 201 CREATED 27234f93-72e1-41bf-ac50-373071eaac75

Contact: Gabriele Meyer - Technik (P-90003)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Gabriele Meyer - Technik (P-90003)",
  "postalAddress" : {
    "street" : "Wiesengrund 118",
    "zipcode" : "28195",
    "city" : "Bremen",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 171 3920029"
  },
  "emailAddresses" : {
    "main" : "gabriele-meyer@fuchs-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED 9ec2f36a-9083-46ac-a9ce-796e70bd4025

Create OPERATIONS: Gabriele Meyer - Technik (P-90003)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "OPERATIONS",
  "anchor.uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
  "holder.uuid" : "27234f93-72e1-41bf-ac50-373071eaac75", // Person: Gabriele Meyer
  "contact.uuid" : "9ec2f36a-9083-46ac-a9ce-796e70bd4025" // Contact: Gabriele Meyer - Technik (P-90003)
}
EOF
=> status: 201 CREATED 20b5ce5e-0afe-40a2-bd3c-8a396470f98c

Verify the Relation Got Created

HTTP GET "/api/hs/office/relations/20b5ce5e-0afe-40a2-bd3c-8a396470f98c" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "20b5ce5e-0afe-40a2-bd3c-8a396470f98c",
  "anchor" : {
    "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fuchs GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "27234f93-72e1-41bf-ac50-373071eaac75", // Person: Gabriele Meyer
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Gabriele",
    "familyName" : "Meyer"
  },
  "type" : "OPERATIONS",
  "mark" : null,
  "contact" : {
    "uuid" : "9ec2f36a-9083-46ac-a9ce-796e70bd4025", // Contact: Gabriele Meyer - Technik (P-90003)
    "caption" : "Gabriele Meyer - Technik (P-90003)",
    "postalAddress" : {
      "zipcode" : "28195",
      "country" : "Germany",
      "city" : "Bremen",
      "street" : "Wiesengrund 118"
    },
    "emailAddresses" : {
      "main" : "gabriele-meyer@fuchs-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 171 3920029"
    }
  }
}

UseCase Create Demo Debitor => Debitor: Fuchs GmbH - Rechnungsstelle (D-9000300)

Properties

Given

name value
partnerPersonName Fuchs GmbH
debitorNumberSuffix 00
billable true
vatBusiness true
defaultPrefix aae
bankAccountHolder Fuchs GmbH (P-90003/0)
iban DE44990300000591816846
bic DEMRDEF0
billingContactCaption Fuchs GmbH - Rechnungsstelle (D-9000300)
billingContactEmailAddress rechnung0@fuchs-gmbh.example.org

BankAccount: Fuchs GmbH (P-90003/0)

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "holder" : "Fuchs GmbH (P-90003/0)",
  "iban" : "DE44990300000591816846",
  "bic" : "DEMRDEF0"
}
EOF
=> status: 201 CREATED 02af3547-7a5c-40d3-afa6-8d8f29d7ed9b

Contact: Fuchs GmbH - Rechnungsstelle (D-9000300)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Fuchs GmbH - Rechnungsstelle (D-9000300)",
  "emailAddresses" : {
    "main" : "rechnung0@fuchs-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED 6c5f3c46-dd7d-4f46-b1f6-b9d7f8b387eb

Create Debitor: Fuchs GmbH - Rechnungsstelle (D-9000300)

HTTP POST "/api/hs/office/debitors" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "debitorRel" : {
    "anchor.uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
    "holder.uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
    "contact.uuid" : "6c5f3c46-dd7d-4f46-b1f6-b9d7f8b387eb" // Contact: Fuchs GmbH - Rechnungsstelle (D-9000300)
  },
  "debitorNumberSuffix" : "00",
  "billable" : true,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount.uuid" : "02af3547-7a5c-40d3-afa6-8d8f29d7ed9b", // BankAccount: Fuchs GmbH (P-90003/0)
  "defaultPrefix" : "aae"
}
EOF
=> status: 201 CREATED 95aef515-fe19-4c4c-8430-20fd086193d6

Verify the Debitor Got Created

HTTP GET "/api/hs/office/debitors/95aef515-fe19-4c4c-8430-20fd086193d6" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "95aef515-fe19-4c4c-8430-20fd086193d6",
  "debitorRel" : {
    "uuid" : "db2d7a3b-4188-4b7a-a890-8f4aaaea189a",
    "anchor" : {
      "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fuchs GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fuchs GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "6c5f3c46-dd7d-4f46-b1f6-b9d7f8b387eb", // Contact: Fuchs GmbH - Rechnungsstelle (D-9000300)
      "caption" : "Fuchs GmbH - Rechnungsstelle (D-9000300)",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "rechnung0@fuchs-gmbh.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-9000300",
  "debitorNumberSuffix" : "00",
  "partner" : {
    "uuid" : "d8ddb167-e0c7-4e8e-b5e4-7df24c393a6a",
    "partnerNumber" : "P-90003",
    "partnerRel" : {
      "uuid" : "f82402ed-cd98-48fb-8f4c-7676f7b4e828",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fuchs GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "8c16ea2f-ace7-44a8-b9c9-fac2b7065860", // Contact: Fuchs GmbH - Hauptkontakt (P-90003)
        "caption" : "Fuchs GmbH - Hauptkontakt (P-90003)",
        "postalAddress" : {
          "zipcode" : "80331",
          "country" : "Germany",
          "city" : "München",
          "street" : "Bachstraße 290",
          "name" : "Rechnungsstelle"
        },
        "emailAddresses" : {
          "main" : "info@fuchs-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 89 99998009"
        }
      }
    },
    "details" : {
      "uuid" : "0e684dc0-965d-42ca-a78f-9b886386f3e7",
      "registrationOffice" : "Registergericht München",
      "registrationNumber" : "322619",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : null,
  "vatCountryCode" : null,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "02af3547-7a5c-40d3-afa6-8d8f29d7ed9b", // BankAccount: Fuchs GmbH (P-90003/0)
    "holder" : "Fuchs GmbH (P-90003/0)",
    "iban" : "DE44990300000591816846",
    "bic" : "DEMRDEF0"
  },
  "defaultPrefix" : "aae"
}

UseCase Create Membership => Membership: Fuchs GmbH

Properties

Given

name value
partnerNumber P-90003
validFrom 2002-02-07
membershipFeeBillable true

Partner: P-90003

HTTP GET "/api/hs/office/partners/P-90003" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "d8ddb167-e0c7-4e8e-b5e4-7df24c393a6a",
  "partnerNumber" : "P-90003",
  "partnerRel" : {
    "uuid" : "f82402ed-cd98-48fb-8f4c-7676f7b4e828",
    "anchor" : {
      "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Hostsharing eG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Fuchs GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "PARTNER",
    "mark" : null,
    "contact" : {
      "uuid" : "8c16ea2f-ace7-44a8-b9c9-fac2b7065860", // Contact: Fuchs GmbH - Hauptkontakt (P-90003)
      "caption" : "Fuchs GmbH - Hauptkontakt (P-90003)",
      "postalAddress" : {
        "zipcode" : "80331",
        "country" : "Germany",
        "city" : "München",
        "street" : "Bachstraße 290",
        "name" : "Rechnungsstelle"
      },
      "emailAddresses" : {
        "main" : "info@fuchs-gmbh.example.org"
      },
      "phoneNumbers" : {
        "office" : "+49 89 99998009"
      }
    }
  },
  "details" : {
    "uuid" : "0e684dc0-965d-42ca-a78f-9b886386f3e7",
    "registrationOffice" : "Registergericht München",
    "registrationNumber" : "322619",
    "birthName" : null,
    "birthPlace" : null,
    "birthday" : null,
    "dateOfDeath" : null
  }
}

The partner-number identifies the partner; a lookup by name could not, because a natural person carries its name in two columns and any name can be the prefix of a longer one.

Create Membership: Fuchs GmbH

HTTP POST "/api/hs/office/memberships" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "partner.uuid" : "d8ddb167-e0c7-4e8e-b5e4-7df24c393a6a", // Partner: P-90003
  "memberNumberSuffix" : "00",
  "status" : "ACTIVE",
  "validFrom" : "2002-02-07",
  "membershipFeeBillable" : true
}
EOF
=> status: 201 CREATED cd2b25ad-19a1-42d4-a7a7-1f0919e7e2b3

Verify That the Membership Got Created

HTTP GET "/api/hs/office/memberships/cd2b25ad-19a1-42d4-a7a7-1f0919e7e2b3" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "cd2b25ad-19a1-42d4-a7a7-1f0919e7e2b3",
  "partner" : {
    "uuid" : "d8ddb167-e0c7-4e8e-b5e4-7df24c393a6a", // Partner: P-90003
    "partnerNumber" : "P-90003",
    "partnerRel" : {
      "uuid" : "f82402ed-cd98-48fb-8f4c-7676f7b4e828",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fuchs GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "8c16ea2f-ace7-44a8-b9c9-fac2b7065860", // Contact: Fuchs GmbH - Hauptkontakt (P-90003)
        "caption" : "Fuchs GmbH - Hauptkontakt (P-90003)",
        "postalAddress" : {
          "zipcode" : "80331",
          "country" : "Germany",
          "city" : "München",
          "street" : "Bachstraße 290",
          "name" : "Rechnungsstelle"
        },
        "emailAddresses" : {
          "main" : "info@fuchs-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 89 99998009"
        }
      }
    },
    "details" : {
      "uuid" : "0e684dc0-965d-42ca-a78f-9b886386f3e7",
      "registrationOffice" : "Registergericht München",
      "registrationNumber" : "322619",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000300",
  "memberNumberSuffix" : "00",
  "validFrom" : "2002-02-07",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Properties

Given

name value
transactionType SUBSCRIPTION
memberNumber M-9000300
reference sign 2002-02-07
shareCount 38
comment initial shares on joining
transactionDate 2002-02-07

Find membershipUuid

HTTP GET "/api/hs/office/memberships/M-9000300" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "cd2b25ad-19a1-42d4-a7a7-1f0919e7e2b3",
  "partner" : {
    "uuid" : "d8ddb167-e0c7-4e8e-b5e4-7df24c393a6a", // Partner: P-90003
    "partnerNumber" : "P-90003",
    "partnerRel" : {
      "uuid" : "f82402ed-cd98-48fb-8f4c-7676f7b4e828",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fuchs GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "8c16ea2f-ace7-44a8-b9c9-fac2b7065860", // Contact: Fuchs GmbH - Hauptkontakt (P-90003)
        "caption" : "Fuchs GmbH - Hauptkontakt (P-90003)",
        "postalAddress" : {
          "zipcode" : "80331",
          "country" : "Germany",
          "city" : "München",
          "street" : "Bachstraße 290",
          "name" : "Rechnungsstelle"
        },
        "emailAddresses" : {
          "main" : "info@fuchs-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 89 99998009"
        }
      }
    },
    "details" : {
      "uuid" : "0e684dc0-965d-42ca-a78f-9b886386f3e7",
      "registrationOffice" : "Registergericht München",
      "registrationNumber" : "322619",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000300",
  "memberNumberSuffix" : "00",
  "validFrom" : "2002-02-07",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Create the Coop-Shares-SUBSCRIPTION Transaction

HTTP POST "/api/hs/office/coopsharestransactions" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "membership.uuid" : "cd2b25ad-19a1-42d4-a7a7-1f0919e7e2b3", // membershipUuid
  "transactionType" : "SUBSCRIPTION",
  "reference" : "sign 2002-02-07",
  "shareCount" : 38,
  "comment" : "initial shares on joining",
  "valueDate" : "2002-02-07"
}
EOF
=> status: 201 CREATED ea947bfa-b94d-4692-8b50-8a86fb70c0e5

Verify Coop-Shares SUBSCRIPTION-Transaction

HTTP GET "/api/hs/office/coopsharestransactions/ea947bfa-b94d-4692-8b50-8a86fb70c0e5" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "ea947bfa-b94d-4692-8b50-8a86fb70c0e5",
  "membership.uuid" : "cd2b25ad-19a1-42d4-a7a7-1f0919e7e2b3", // membershipUuid
  "transactionType" : "SUBSCRIPTION",
  "shareCount" : 38,
  "valueDate" : "2002-02-07",
  "reference" : "sign 2002-02-07",
  "comment" : "initial shares on joining",
  "revertedShareTx" : null,
  "reversalShareTx" : null
}

Properties

Given

name value
transactionType DEPOSIT
memberNumber M-9000300
reference sign 2002-02-07
assetValue 2432
comment deposit for initial shares
transactionDate 2002-02-17

Find membershipUuid

HTTP GET "/api/hs/office/memberships/M-9000300" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "cd2b25ad-19a1-42d4-a7a7-1f0919e7e2b3", // membershipUuid
  "partner" : {
    "uuid" : "d8ddb167-e0c7-4e8e-b5e4-7df24c393a6a", // Partner: P-90003
    "partnerNumber" : "P-90003",
    "partnerRel" : {
      "uuid" : "f82402ed-cd98-48fb-8f4c-7676f7b4e828",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Fuchs GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "8c16ea2f-ace7-44a8-b9c9-fac2b7065860", // Contact: Fuchs GmbH - Hauptkontakt (P-90003)
        "caption" : "Fuchs GmbH - Hauptkontakt (P-90003)",
        "postalAddress" : {
          "zipcode" : "80331",
          "country" : "Germany",
          "city" : "München",
          "street" : "Bachstraße 290",
          "name" : "Rechnungsstelle"
        },
        "emailAddresses" : {
          "main" : "info@fuchs-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 89 99998009"
        }
      }
    },
    "details" : {
      "uuid" : "0e684dc0-965d-42ca-a78f-9b886386f3e7",
      "registrationOffice" : "Registergericht München",
      "registrationNumber" : "322619",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000300",
  "memberNumberSuffix" : "00",
  "validFrom" : "2002-02-07",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Create the Coop-Assets-DEPOSIT Transaction

HTTP POST "/api/hs/office/coopassetstransactions" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "membership.uuid" : "cd2b25ad-19a1-42d4-a7a7-1f0919e7e2b3", // membershipUuid
  "transactionType" : "DEPOSIT",
  "reference" : "sign 2002-02-07",
  "assetValue" : 2432,
  "comment" : "deposit for initial shares",
  "valueDate" : "2002-02-17"
}
EOF
=> status: 201 CREATED 95d3b34e-b27a-4110-8839-50b1e92cfb7d

Verify Coop-Assets DEPOSIT-Transaction

HTTP GET "/api/hs/office/coopassetstransactions/95d3b34e-b27a-4110-8839-50b1e92cfb7d" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "95d3b34e-b27a-4110-8839-50b1e92cfb7d",
  "membership.uuid" : "cd2b25ad-19a1-42d4-a7a7-1f0919e7e2b3", // membershipUuid
  "membership.memberNumber" : "M-9000300",
  "transactionType" : "DEPOSIT",
  "assetValue" : 2432,
  "valueDate" : "2002-02-17",
  "reference" : "sign 2002-02-07",
  "comment" : "deposit for initial shares",
  "adoptionAssetTx" : null,
  "transferAssetTx" : null,
  "revertedAssetTx" : null,
  "reversalAssetTx" : null
}

Contact: Christian Fuchs - private Mailinglisten-Adresse

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Christian Fuchs - private Mailinglisten-Adresse",
  "postalAddress" : {
    "street" : "Blumenstraße 234",
    "zipcode" : "30159",
    "city" : "Hannover",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "main" : "+49 171 3920060"
  },
  "emailAddresses" : {
    "main" : "christian-fuchs@example.net"
  }
}
EOF
=> status: 201 CREATED 823f0f32-7774-4791-a026-f2a691da1a30

UseCase Add Demo Subscription => SUBSCRIBER generalversammlung: Christian Fuchs (P-90003)

Properties

Given

name value
partnerPersonName Fuchs GmbH
mailingList generalversammlung
holderGivenName Christian
holderFamilyName Fuchs
contactCaption Christian Fuchs - private Mailinglisten-Adresse

Create SUBSCRIBER generalversammlung: Christian Fuchs (P-90003)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "generalversammlung",
  "anchor.uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
  "holder.uuid" : "5a17bed8-f4d6-49ac-943b-0946a704d9f3", // Person: Christian Fuchs
  "contact.uuid" : "823f0f32-7774-4791-a026-f2a691da1a30" // Contact: Christian Fuchs - private Mailinglisten-Adresse
}
EOF
=> status: 201 CREATED 30e7c94a-4196-47a6-bd43-0cd8ca8856f6

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/30e7c94a-4196-47a6-bd43-0cd8ca8856f6" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "30e7c94a-4196-47a6-bd43-0cd8ca8856f6",
  "anchor" : {
    "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fuchs GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "5a17bed8-f4d6-49ac-943b-0946a704d9f3", // Person: Christian Fuchs
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Christian",
    "familyName" : "Fuchs"
  },
  "type" : "SUBSCRIBER",
  "mark" : "generalversammlung",
  "contact" : {
    "uuid" : "823f0f32-7774-4791-a026-f2a691da1a30", // Contact: Christian Fuchs - private Mailinglisten-Adresse
    "caption" : "Christian Fuchs - private Mailinglisten-Adresse",
    "postalAddress" : {
      "zipcode" : "30159",
      "country" : "Germany",
      "city" : "Hannover",
      "street" : "Blumenstraße 234"
    },
    "emailAddresses" : {
      "main" : "christian-fuchs@example.net"
    },
    "phoneNumbers" : {
      "main" : "+49 171 3920060"
    }
  }
}

UseCase Add Demo Subscription => SUBSCRIBER members-announce: Christian Fuchs (P-90003)

Properties

Given

name value
partnerPersonName Fuchs GmbH
mailingList members-announce
holderGivenName Christian
holderFamilyName Fuchs
contactCaption Christian Fuchs - private Mailinglisten-Adresse

Create SUBSCRIBER members-announce: Christian Fuchs (P-90003)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "members-announce",
  "anchor.uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
  "holder.uuid" : "5a17bed8-f4d6-49ac-943b-0946a704d9f3", // Person: Christian Fuchs
  "contact.uuid" : "823f0f32-7774-4791-a026-f2a691da1a30" // Contact: Christian Fuchs - private Mailinglisten-Adresse
}
EOF
=> status: 201 CREATED 2b0095c2-7bef-4052-8b5d-c947e6e11592

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/2b0095c2-7bef-4052-8b5d-c947e6e11592" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "2b0095c2-7bef-4052-8b5d-c947e6e11592",
  "anchor" : {
    "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fuchs GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "5a17bed8-f4d6-49ac-943b-0946a704d9f3", // Person: Christian Fuchs
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Christian",
    "familyName" : "Fuchs"
  },
  "type" : "SUBSCRIBER",
  "mark" : "members-announce",
  "contact" : {
    "uuid" : "823f0f32-7774-4791-a026-f2a691da1a30", // Contact: Christian Fuchs - private Mailinglisten-Adresse
    "caption" : "Christian Fuchs - private Mailinglisten-Adresse",
    "postalAddress" : {
      "zipcode" : "30159",
      "country" : "Germany",
      "city" : "Hannover",
      "street" : "Blumenstraße 234"
    },
    "emailAddresses" : {
      "main" : "christian-fuchs@example.net"
    },
    "phoneNumbers" : {
      "main" : "+49 171 3920060"
    }
  }
}

UseCase Add Demo Subscription => SUBSCRIBER customers-announce: Christian Fuchs (P-90003)

Properties

Given

name value
partnerPersonName Fuchs GmbH
mailingList customers-announce
holderGivenName Christian
holderFamilyName Fuchs
contactCaption Christian Fuchs - private Mailinglisten-Adresse

Create SUBSCRIBER customers-announce: Christian Fuchs (P-90003)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "customers-announce",
  "anchor.uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
  "holder.uuid" : "5a17bed8-f4d6-49ac-943b-0946a704d9f3", // Person: Christian Fuchs
  "contact.uuid" : "823f0f32-7774-4791-a026-f2a691da1a30" // Contact: Christian Fuchs - private Mailinglisten-Adresse
}
EOF
=> status: 201 CREATED a35bc69b-7d5d-46df-9042-0445df0cfd9f

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/a35bc69b-7d5d-46df-9042-0445df0cfd9f" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "a35bc69b-7d5d-46df-9042-0445df0cfd9f",
  "anchor" : {
    "uuid" : "ac062447-bb87-4bc2-9071-7d3ea1660fe2", // Person: Fuchs GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Fuchs GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "5a17bed8-f4d6-49ac-943b-0946a704d9f3", // Person: Christian Fuchs
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Christian",
    "familyName" : "Fuchs"
  },
  "type" : "SUBSCRIBER",
  "mark" : "customers-announce",
  "contact" : {
    "uuid" : "823f0f32-7774-4791-a026-f2a691da1a30", // Contact: Christian Fuchs - private Mailinglisten-Adresse
    "caption" : "Christian Fuchs - private Mailinglisten-Adresse",
    "postalAddress" : {
      "zipcode" : "30159",
      "country" : "Germany",
      "city" : "Hannover",
      "street" : "Blumenstraße 234"
    },
    "emailAddresses" : {
      "main" : "christian-fuchs@example.net"
    },
    "phoneNumbers" : {
      "main" : "+49 171 3920060"
    }
  }
}

UseCase Create Partner => Partner: P-90004 - Schäfer Elektro GmbH

Properties

Given

name value
partnerNumber P-90004
personType LEGAL_PERSON
contactCaption Schäfer Elektro GmbH - Hauptkontakt (P-90004)
postalAddress “name”: “Buchhaltung”,
        “street”: “Veilchenweg 528”,
        “zipcode”: “44135”,
        “city”: “Dortmund”,
        “country”: “Germany”
officePhoneNumber +49 176 04069082
emailAddress info@schaefer-elektro-gmbh.example.org
tradeName Schäfer Elektro GmbH
registrationOffice Registergericht Dortmund
registrationNumber 619312

Person: Hostsharing eG

HTTP GET "/api/hs/office/persons?name=Hostsharing+eG" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Hostsharing eG",
  "salutation" : null,
  "title" : null,
  "givenName" : null,
  "familyName" : null
} ]

Even in production data we expect this query to return just a single result.

Person: Schäfer Elektro GmbH

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Schäfer Elektro GmbH"
}
EOF
=> status: 201 CREATED 0ec38379-84d2-4601-890d-97086a53add4

Contact: Schäfer Elektro GmbH - Hauptkontakt (P-90004)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Schäfer Elektro GmbH - Hauptkontakt (P-90004)",
  "postalAddress" : {
    "name" : "Buchhaltung",
    "street" : "Veilchenweg 528",
    "zipcode" : "44135",
    "city" : "Dortmund",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 176 04069082"
  },
  "emailAddresses" : {
    "main" : "info@schaefer-elektro-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED ce887750-d574-4787-8b5c-6a2bdb410dd9

Create Partner: P-90004 - Schäfer Elektro GmbH

HTTP POST "/api/hs/office/partners" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "partnerNumber" : "P-90004",
  "partnerRel" : {
    "anchor.uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
    "holder.uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "contact.uuid" : "ce887750-d574-4787-8b5c-6a2bdb410dd9" // Contact: Schäfer Elektro GmbH - Hauptkontakt (P-90004)
  },
  "details" : {
    "registrationOffice" : "Registergericht Dortmund",
    "registrationNumber" : "619312"
  }
}
EOF
=> status: 201 CREATED 15ab278d-b065-4aa3-b412-1345bc9e1b0b

Verify the New Partner Relation

HTTP GET "/api/hs/office/relations?relationType=PARTNER&contactData=Sch%C3%A4fer+Elektro+GmbH+-+Hauptkontakt+%28P-90004%29" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "4e8af615-1974-4774-92fd-b431315a09c8",
  "anchor" : {
    "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Schäfer Elektro GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "ce887750-d574-4787-8b5c-6a2bdb410dd9", // Contact: Schäfer Elektro GmbH - Hauptkontakt (P-90004)
    "caption" : "Schäfer Elektro GmbH - Hauptkontakt (P-90004)",
    "postalAddress" : {
      "zipcode" : "44135",
      "country" : "Germany",
      "city" : "Dortmund",
      "street" : "Veilchenweg 528",
      "name" : "Buchhaltung"
    },
    "emailAddresses" : {
      "main" : "info@schaefer-elektro-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 176 04069082"
    }
  }
} ]

UseCase Add Demo Relation => REPRESENTATIVE: Jana Schäfer - Vertretung (P-90004)

Properties

Given

name value
partnerPersonName Schäfer Elektro GmbH
relationType REPRESENTATIVE
holderGivenName Jana
holderFamilyName Schäfer
contactCaption Jana Schäfer - Vertretung (P-90004)
postalAddress         “street”: “Schulstraße 334”,
        “zipcode”: “34117”,
        “city”: “Kassel”,
        “country”: “Germany”
phoneNumber +49 176 04069020
emailAddress jana-schaefer@schaefer-elektro-gmbh.example.org

Person: Jana Schäfer

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Schäfer",
  "givenName" : "Jana"
}
EOF
=> status: 201 CREATED a35edbdf-d6fd-47b5-9f8b-a3a010efde41

Contact: Jana Schäfer - Vertretung (P-90004)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Jana Schäfer - Vertretung (P-90004)",
  "postalAddress" : {
    "street" : "Schulstraße 334",
    "zipcode" : "34117",
    "city" : "Kassel",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 176 04069020"
  },
  "emailAddresses" : {
    "main" : "jana-schaefer@schaefer-elektro-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED 84ba7e6c-d5fb-4ccc-8f97-eacbadce2d19

Create REPRESENTATIVE: Jana Schäfer - Vertretung (P-90004)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "REPRESENTATIVE",
  "anchor.uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
  "holder.uuid" : "a35edbdf-d6fd-47b5-9f8b-a3a010efde41", // Person: Jana Schäfer
  "contact.uuid" : "84ba7e6c-d5fb-4ccc-8f97-eacbadce2d19" // Contact: Jana Schäfer - Vertretung (P-90004)
}
EOF
=> status: 201 CREATED 109b6b98-126f-40df-821c-730b32c483b7

Verify the Relation Got Created

HTTP GET "/api/hs/office/relations/109b6b98-126f-40df-821c-730b32c483b7" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "109b6b98-126f-40df-821c-730b32c483b7",
  "anchor" : {
    "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Schäfer Elektro GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "a35edbdf-d6fd-47b5-9f8b-a3a010efde41", // Person: Jana Schäfer
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Jana",
    "familyName" : "Schäfer"
  },
  "type" : "REPRESENTATIVE",
  "mark" : null,
  "contact" : {
    "uuid" : "84ba7e6c-d5fb-4ccc-8f97-eacbadce2d19", // Contact: Jana Schäfer - Vertretung (P-90004)
    "caption" : "Jana Schäfer - Vertretung (P-90004)",
    "postalAddress" : {
      "zipcode" : "34117",
      "country" : "Germany",
      "city" : "Kassel",
      "street" : "Schulstraße 334"
    },
    "emailAddresses" : {
      "main" : "jana-schaefer@schaefer-elektro-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 176 04069020"
    }
  }
}

UseCase Add Demo Relation => OPERATIONS: Claudia Schmitt - Technik (P-90004)

Properties

Given

name value
partnerPersonName Schäfer Elektro GmbH
relationType OPERATIONS
holderGivenName Claudia
holderFamilyName Schmitt
contactCaption Claudia Schmitt - Technik (P-90004)
postalAddress         “street”: “Heideweg 201”,
        “zipcode”: “60311”,
        “city”: “Frankfurt am Main”,
        “country”: “Germany”
phoneNumber +49 69 90009159
emailAddress claudia-schmitt@schaefer-elektro-gmbh.example.org

Person: Claudia Schmitt

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Schmitt",
  "givenName" : "Claudia"
}
EOF
=> status: 201 CREATED f6e9e977-0ee9-449b-b843-503075e2930e

Contact: Claudia Schmitt - Technik (P-90004)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Claudia Schmitt - Technik (P-90004)",
  "postalAddress" : {
    "street" : "Heideweg 201",
    "zipcode" : "60311",
    "city" : "Frankfurt am Main",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 69 90009159"
  },
  "emailAddresses" : {
    "main" : "claudia-schmitt@schaefer-elektro-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED 7a71bc66-680c-4804-8a66-63e56ade38a2

Create OPERATIONS: Claudia Schmitt - Technik (P-90004)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "OPERATIONS",
  "anchor.uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
  "holder.uuid" : "f6e9e977-0ee9-449b-b843-503075e2930e", // Person: Claudia Schmitt
  "contact.uuid" : "7a71bc66-680c-4804-8a66-63e56ade38a2" // Contact: Claudia Schmitt - Technik (P-90004)
}
EOF
=> status: 201 CREATED a9a3d5c0-60b5-49b6-8231-6f5ae6baaf6d

Verify the Relation Got Created

HTTP GET "/api/hs/office/relations/a9a3d5c0-60b5-49b6-8231-6f5ae6baaf6d" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "a9a3d5c0-60b5-49b6-8231-6f5ae6baaf6d",
  "anchor" : {
    "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Schäfer Elektro GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "f6e9e977-0ee9-449b-b843-503075e2930e", // Person: Claudia Schmitt
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Claudia",
    "familyName" : "Schmitt"
  },
  "type" : "OPERATIONS",
  "mark" : null,
  "contact" : {
    "uuid" : "7a71bc66-680c-4804-8a66-63e56ade38a2", // Contact: Claudia Schmitt - Technik (P-90004)
    "caption" : "Claudia Schmitt - Technik (P-90004)",
    "postalAddress" : {
      "zipcode" : "60311",
      "country" : "Germany",
      "city" : "Frankfurt am Main",
      "street" : "Heideweg 201"
    },
    "emailAddresses" : {
      "main" : "claudia-schmitt@schaefer-elektro-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 69 90009159"
    }
  }
}

UseCase Create Demo Debitor => Debitor: Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)

Properties

Given

name value
partnerPersonName Schäfer Elektro GmbH
debitorNumberSuffix 00
billable true
vatBusiness true
defaultPrefix aaf
bankAccountHolder Schäfer Elektro GmbH (P-90004/0)
iban DE18990100000374198599
bic DEMSDEH0
billingContactCaption Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)
billingContactEmailAddress rechnung0@schaefer-elektro-gmbh.example.org

BankAccount: Schäfer Elektro GmbH (P-90004/0)

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "holder" : "Schäfer Elektro GmbH (P-90004/0)",
  "iban" : "DE18990100000374198599",
  "bic" : "DEMSDEH0"
}
EOF
=> status: 201 CREATED af1bf70d-97a4-4485-9680-94219da03aff

Contact: Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)",
  "emailAddresses" : {
    "main" : "rechnung0@schaefer-elektro-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED 3c34fd56-62b5-49cc-8a0a-c2bc8017c144

Create Debitor: Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)

HTTP POST "/api/hs/office/debitors" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "debitorRel" : {
    "anchor.uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "holder.uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "contact.uuid" : "3c34fd56-62b5-49cc-8a0a-c2bc8017c144" // Contact: Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)
  },
  "debitorNumberSuffix" : "00",
  "billable" : true,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount.uuid" : "af1bf70d-97a4-4485-9680-94219da03aff", // BankAccount: Schäfer Elektro GmbH (P-90004/0)
  "defaultPrefix" : "aaf"
}
EOF
=> status: 201 CREATED 04427492-df44-4fe0-b6c6-792f11c94003

Verify the Debitor Got Created

HTTP GET "/api/hs/office/debitors/04427492-df44-4fe0-b6c6-792f11c94003" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "04427492-df44-4fe0-b6c6-792f11c94003",
  "debitorRel" : {
    "uuid" : "5f9c6e58-0657-4f44-ab76-2178e0a17203",
    "anchor" : {
      "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Schäfer Elektro GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Schäfer Elektro GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "3c34fd56-62b5-49cc-8a0a-c2bc8017c144", // Contact: Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)
      "caption" : "Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "rechnung0@schaefer-elektro-gmbh.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-9000400",
  "debitorNumberSuffix" : "00",
  "partner" : {
    "uuid" : "15ab278d-b065-4aa3-b412-1345bc9e1b0b",
    "partnerNumber" : "P-90004",
    "partnerRel" : {
      "uuid" : "4e8af615-1974-4774-92fd-b431315a09c8",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Schäfer Elektro GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "ce887750-d574-4787-8b5c-6a2bdb410dd9", // Contact: Schäfer Elektro GmbH - Hauptkontakt (P-90004)
        "caption" : "Schäfer Elektro GmbH - Hauptkontakt (P-90004)",
        "postalAddress" : {
          "zipcode" : "44135",
          "country" : "Germany",
          "city" : "Dortmund",
          "street" : "Veilchenweg 528",
          "name" : "Buchhaltung"
        },
        "emailAddresses" : {
          "main" : "info@schaefer-elektro-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 176 04069082"
        }
      }
    },
    "details" : {
      "uuid" : "780581d1-166c-417f-a82c-467e3bb829b5",
      "registrationOffice" : "Registergericht Dortmund",
      "registrationNumber" : "619312",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : null,
  "vatCountryCode" : null,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "af1bf70d-97a4-4485-9680-94219da03aff", // BankAccount: Schäfer Elektro GmbH (P-90004/0)
    "holder" : "Schäfer Elektro GmbH (P-90004/0)",
    "iban" : "DE18990100000374198599",
    "bic" : "DEMSDEH0"
  },
  "defaultPrefix" : "aaf"
}

UseCase Create Demo Sepa Mandate => SEPA-Mandat: D-9000400-aktuell

Properties

Given

name value
debitorNumber D-9000400
mandateReference D-9000400-aktuell
bankAccountHolder Schäfer Elektro GmbH (P-90004/0/aktuell)
iban DE13990400000527372297
bic DEMDDEB0
agreement 2020-07-13
validFrom 2020-07-27

Debitor of D-9000400-aktuell

HTTP GET "/api/hs/office/debitors/D-9000400" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "04427492-df44-4fe0-b6c6-792f11c94003",
  "debitorRel" : {
    "uuid" : "5f9c6e58-0657-4f44-ab76-2178e0a17203",
    "anchor" : {
      "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Schäfer Elektro GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Schäfer Elektro GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "3c34fd56-62b5-49cc-8a0a-c2bc8017c144", // Contact: Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)
      "caption" : "Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "rechnung0@schaefer-elektro-gmbh.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-9000400",
  "debitorNumberSuffix" : "00",
  "partner" : {
    "uuid" : "15ab278d-b065-4aa3-b412-1345bc9e1b0b",
    "partnerNumber" : "P-90004",
    "partnerRel" : {
      "uuid" : "4e8af615-1974-4774-92fd-b431315a09c8",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Schäfer Elektro GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "ce887750-d574-4787-8b5c-6a2bdb410dd9", // Contact: Schäfer Elektro GmbH - Hauptkontakt (P-90004)
        "caption" : "Schäfer Elektro GmbH - Hauptkontakt (P-90004)",
        "postalAddress" : {
          "zipcode" : "44135",
          "country" : "Germany",
          "city" : "Dortmund",
          "street" : "Veilchenweg 528",
          "name" : "Buchhaltung"
        },
        "emailAddresses" : {
          "main" : "info@schaefer-elektro-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 176 04069082"
        }
      }
    },
    "details" : {
      "uuid" : "780581d1-166c-417f-a82c-467e3bb829b5",
      "registrationOffice" : "Registergericht Dortmund",
      "registrationNumber" : "619312",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : null,
  "vatCountryCode" : null,
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "af1bf70d-97a4-4485-9680-94219da03aff", // BankAccount: Schäfer Elektro GmbH (P-90004/0)
    "holder" : "Schäfer Elektro GmbH (P-90004/0)",
    "iban" : "DE18990100000374198599",
    "bic" : "DEMSDEH0"
  },
  "defaultPrefix" : "aaf"
}

BankAccount: Schäfer Elektro GmbH (P-90004/0/aktuell)

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "holder" : "Schäfer Elektro GmbH (P-90004/0/aktuell)",
  "iban" : "DE13990400000527372297",
  "bic" : "DEMDDEB0"
}
EOF
=> status: 201 CREATED 65c7f83f-d904-4c0e-853e-a0a57152525a

Create SEPA-Mandat: D-9000400-aktuell

HTTP POST "/api/hs/office/sepamandates" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "debitor.uuid" : "04427492-df44-4fe0-b6c6-792f11c94003", // Debitor of D-9000400-aktuell
  "bankAccount.uuid" : "65c7f83f-d904-4c0e-853e-a0a57152525a", // BankAccount: Schäfer Elektro GmbH (P-90004/0/aktuell)
  "reference" : "D-9000400-aktuell",
  "agreement" : "2020-07-13",
  "validFrom" : "2020-07-27"
}
EOF
=> status: 201 CREATED a9c6dcaa-c732-421e-9912-74ab3be8288b

Verify the SEPA-Mandate Got Created

HTTP GET "/api/hs/office/sepamandates/a9c6dcaa-c732-421e-9912-74ab3be8288b" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "a9c6dcaa-c732-421e-9912-74ab3be8288b",
  "debitor" : {
    "uuid" : "04427492-df44-4fe0-b6c6-792f11c94003", // Debitor of D-9000400-aktuell
    "debitorRel" : {
      "uuid" : "5f9c6e58-0657-4f44-ab76-2178e0a17203",
      "anchor" : {
        "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Schäfer Elektro GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Schäfer Elektro GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "DEBITOR",
      "mark" : null,
      "contact" : {
        "uuid" : "3c34fd56-62b5-49cc-8a0a-c2bc8017c144", // Contact: Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)
        "caption" : "Schäfer Elektro GmbH - Rechnungsstelle (D-9000400)",
        "postalAddress" : { },
        "emailAddresses" : {
          "main" : "rechnung0@schaefer-elektro-gmbh.example.org"
        },
        "phoneNumbers" : { }
      }
    },
    "debitorNumber" : "D-9000400",
    "debitorNumberSuffix" : "00",
    "partner" : {
      "uuid" : "15ab278d-b065-4aa3-b412-1345bc9e1b0b",
      "partnerNumber" : "P-90004",
      "partnerRel" : {
        "uuid" : "4e8af615-1974-4774-92fd-b431315a09c8",
        "anchor" : {
          "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Hostsharing eG",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "holder" : {
          "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Schäfer Elektro GmbH",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "type" : "PARTNER",
        "mark" : null,
        "contact" : {
          "uuid" : "ce887750-d574-4787-8b5c-6a2bdb410dd9", // Contact: Schäfer Elektro GmbH - Hauptkontakt (P-90004)
          "caption" : "Schäfer Elektro GmbH - Hauptkontakt (P-90004)",
          "postalAddress" : {
            "zipcode" : "44135",
            "country" : "Germany",
            "city" : "Dortmund",
            "street" : "Veilchenweg 528",
            "name" : "Buchhaltung"
          },
          "emailAddresses" : {
            "main" : "info@schaefer-elektro-gmbh.example.org"
          },
          "phoneNumbers" : {
            "office" : "+49 176 04069082"
          }
        }
      },
      "details" : {
        "uuid" : "780581d1-166c-417f-a82c-467e3bb829b5",
        "registrationOffice" : "Registergericht Dortmund",
        "registrationNumber" : "619312",
        "birthName" : null,
        "birthPlace" : null,
        "birthday" : null,
        "dateOfDeath" : null
      }
    },
    "billable" : true,
    "vatId" : null,
    "vatCountryCode" : null,
    "vatBusiness" : true,
    "vatReverseCharge" : false,
    "refundBankAccount" : {
      "uuid" : "af1bf70d-97a4-4485-9680-94219da03aff", // BankAccount: Schäfer Elektro GmbH (P-90004/0)
      "holder" : "Schäfer Elektro GmbH (P-90004/0)",
      "iban" : "DE18990100000374198599",
      "bic" : "DEMSDEH0"
    },
    "defaultPrefix" : "aaf"
  },
  "bankAccount" : {
    "uuid" : "65c7f83f-d904-4c0e-853e-a0a57152525a", // BankAccount: Schäfer Elektro GmbH (P-90004/0/aktuell)
    "holder" : "Schäfer Elektro GmbH (P-90004/0/aktuell)",
    "iban" : "DE13990400000527372297",
    "bic" : "DEMDDEB0"
  },
  "reference" : "D-9000400-aktuell",
  "agreement" : "2020-07-13",
  "validFrom" : "2020-07-27",
  "validTo" : null
}

UseCase Create Membership => Membership: Schäfer Elektro GmbH

Properties

Given

name value
partnerNumber P-90004
validFrom 2005-01-22
membershipFeeBillable true

Partner: P-90004

HTTP GET "/api/hs/office/partners/P-90004" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "15ab278d-b065-4aa3-b412-1345bc9e1b0b",
  "partnerNumber" : "P-90004",
  "partnerRel" : {
    "uuid" : "4e8af615-1974-4774-92fd-b431315a09c8",
    "anchor" : {
      "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Hostsharing eG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Schäfer Elektro GmbH",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "PARTNER",
    "mark" : null,
    "contact" : {
      "uuid" : "ce887750-d574-4787-8b5c-6a2bdb410dd9", // Contact: Schäfer Elektro GmbH - Hauptkontakt (P-90004)
      "caption" : "Schäfer Elektro GmbH - Hauptkontakt (P-90004)",
      "postalAddress" : {
        "zipcode" : "44135",
        "country" : "Germany",
        "city" : "Dortmund",
        "street" : "Veilchenweg 528",
        "name" : "Buchhaltung"
      },
      "emailAddresses" : {
        "main" : "info@schaefer-elektro-gmbh.example.org"
      },
      "phoneNumbers" : {
        "office" : "+49 176 04069082"
      }
    }
  },
  "details" : {
    "uuid" : "780581d1-166c-417f-a82c-467e3bb829b5",
    "registrationOffice" : "Registergericht Dortmund",
    "registrationNumber" : "619312",
    "birthName" : null,
    "birthPlace" : null,
    "birthday" : null,
    "dateOfDeath" : null
  }
}

The partner-number identifies the partner; a lookup by name could not, because a natural person carries its name in two columns and any name can be the prefix of a longer one.

Create Membership: Schäfer Elektro GmbH

HTTP POST "/api/hs/office/memberships" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "partner.uuid" : "15ab278d-b065-4aa3-b412-1345bc9e1b0b", // Partner: P-90004
  "memberNumberSuffix" : "00",
  "status" : "ACTIVE",
  "validFrom" : "2005-01-22",
  "membershipFeeBillable" : true
}
EOF
=> status: 201 CREATED bf4b2dba-c474-444a-afe9-f4d9d515dc11

Verify That the Membership Got Created

HTTP GET "/api/hs/office/memberships/bf4b2dba-c474-444a-afe9-f4d9d515dc11" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "bf4b2dba-c474-444a-afe9-f4d9d515dc11",
  "partner" : {
    "uuid" : "15ab278d-b065-4aa3-b412-1345bc9e1b0b", // Partner: P-90004
    "partnerNumber" : "P-90004",
    "partnerRel" : {
      "uuid" : "4e8af615-1974-4774-92fd-b431315a09c8",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Schäfer Elektro GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "ce887750-d574-4787-8b5c-6a2bdb410dd9", // Contact: Schäfer Elektro GmbH - Hauptkontakt (P-90004)
        "caption" : "Schäfer Elektro GmbH - Hauptkontakt (P-90004)",
        "postalAddress" : {
          "zipcode" : "44135",
          "country" : "Germany",
          "city" : "Dortmund",
          "street" : "Veilchenweg 528",
          "name" : "Buchhaltung"
        },
        "emailAddresses" : {
          "main" : "info@schaefer-elektro-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 176 04069082"
        }
      }
    },
    "details" : {
      "uuid" : "780581d1-166c-417f-a82c-467e3bb829b5",
      "registrationOffice" : "Registergericht Dortmund",
      "registrationNumber" : "619312",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000400",
  "memberNumberSuffix" : "00",
  "validFrom" : "2005-01-22",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Properties

Given

name value
transactionType SUBSCRIPTION
memberNumber M-9000400
reference sign 2005-01-22
shareCount 24
comment initial shares on joining
transactionDate 2005-01-22

Find membershipUuid

HTTP GET "/api/hs/office/memberships/M-9000400" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "bf4b2dba-c474-444a-afe9-f4d9d515dc11",
  "partner" : {
    "uuid" : "15ab278d-b065-4aa3-b412-1345bc9e1b0b", // Partner: P-90004
    "partnerNumber" : "P-90004",
    "partnerRel" : {
      "uuid" : "4e8af615-1974-4774-92fd-b431315a09c8",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Schäfer Elektro GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "ce887750-d574-4787-8b5c-6a2bdb410dd9", // Contact: Schäfer Elektro GmbH - Hauptkontakt (P-90004)
        "caption" : "Schäfer Elektro GmbH - Hauptkontakt (P-90004)",
        "postalAddress" : {
          "zipcode" : "44135",
          "country" : "Germany",
          "city" : "Dortmund",
          "street" : "Veilchenweg 528",
          "name" : "Buchhaltung"
        },
        "emailAddresses" : {
          "main" : "info@schaefer-elektro-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 176 04069082"
        }
      }
    },
    "details" : {
      "uuid" : "780581d1-166c-417f-a82c-467e3bb829b5",
      "registrationOffice" : "Registergericht Dortmund",
      "registrationNumber" : "619312",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000400",
  "memberNumberSuffix" : "00",
  "validFrom" : "2005-01-22",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Create the Coop-Shares-SUBSCRIPTION Transaction

HTTP POST "/api/hs/office/coopsharestransactions" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "membership.uuid" : "bf4b2dba-c474-444a-afe9-f4d9d515dc11", // membershipUuid
  "transactionType" : "SUBSCRIPTION",
  "reference" : "sign 2005-01-22",
  "shareCount" : 24,
  "comment" : "initial shares on joining",
  "valueDate" : "2005-01-22"
}
EOF
=> status: 201 CREATED 1dcac58d-cef3-4b0d-9113-726fa2fd73e2

Verify Coop-Shares SUBSCRIPTION-Transaction

HTTP GET "/api/hs/office/coopsharestransactions/1dcac58d-cef3-4b0d-9113-726fa2fd73e2" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "1dcac58d-cef3-4b0d-9113-726fa2fd73e2",
  "membership.uuid" : "bf4b2dba-c474-444a-afe9-f4d9d515dc11", // membershipUuid
  "transactionType" : "SUBSCRIPTION",
  "shareCount" : 24,
  "valueDate" : "2005-01-22",
  "reference" : "sign 2005-01-22",
  "comment" : "initial shares on joining",
  "revertedShareTx" : null,
  "reversalShareTx" : null
}

Properties

Given

name value
transactionType DEPOSIT
memberNumber M-9000400
reference sign 2005-01-22
assetValue 1536
comment deposit for initial shares
transactionDate 2005-02-06

Find membershipUuid

HTTP GET "/api/hs/office/memberships/M-9000400" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "bf4b2dba-c474-444a-afe9-f4d9d515dc11", // membershipUuid
  "partner" : {
    "uuid" : "15ab278d-b065-4aa3-b412-1345bc9e1b0b", // Partner: P-90004
    "partnerNumber" : "P-90004",
    "partnerRel" : {
      "uuid" : "4e8af615-1974-4774-92fd-b431315a09c8",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Schäfer Elektro GmbH",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "ce887750-d574-4787-8b5c-6a2bdb410dd9", // Contact: Schäfer Elektro GmbH - Hauptkontakt (P-90004)
        "caption" : "Schäfer Elektro GmbH - Hauptkontakt (P-90004)",
        "postalAddress" : {
          "zipcode" : "44135",
          "country" : "Germany",
          "city" : "Dortmund",
          "street" : "Veilchenweg 528",
          "name" : "Buchhaltung"
        },
        "emailAddresses" : {
          "main" : "info@schaefer-elektro-gmbh.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 176 04069082"
        }
      }
    },
    "details" : {
      "uuid" : "780581d1-166c-417f-a82c-467e3bb829b5",
      "registrationOffice" : "Registergericht Dortmund",
      "registrationNumber" : "619312",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000400",
  "memberNumberSuffix" : "00",
  "validFrom" : "2005-01-22",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
}

Create the Coop-Assets-DEPOSIT Transaction

HTTP POST "/api/hs/office/coopassetstransactions" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "membership.uuid" : "bf4b2dba-c474-444a-afe9-f4d9d515dc11", // membershipUuid
  "transactionType" : "DEPOSIT",
  "reference" : "sign 2005-01-22",
  "assetValue" : 1536,
  "comment" : "deposit for initial shares",
  "valueDate" : "2005-02-06"
}
EOF
=> status: 201 CREATED e9b903c5-9b5c-4323-8753-aa651c30523d

Verify Coop-Assets DEPOSIT-Transaction

HTTP GET "/api/hs/office/coopassetstransactions/e9b903c5-9b5c-4323-8753-aa651c30523d" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "e9b903c5-9b5c-4323-8753-aa651c30523d",
  "membership.uuid" : "bf4b2dba-c474-444a-afe9-f4d9d515dc11", // membershipUuid
  "membership.memberNumber" : "M-9000400",
  "transactionType" : "DEPOSIT",
  "assetValue" : 1536,
  "valueDate" : "2005-02-06",
  "reference" : "sign 2005-01-22",
  "comment" : "deposit for initial shares",
  "adoptionAssetTx" : null,
  "transferAssetTx" : null,
  "revertedAssetTx" : null,
  "reversalAssetTx" : null
}

UseCase Add Demo Subscription => SUBSCRIBER generalversammlung: Jana Schäfer (P-90004)

Properties

Given

name value
partnerPersonName Schäfer Elektro GmbH
mailingList generalversammlung
holderGivenName Jana
holderFamilyName Schäfer
contactCaption Jana Schäfer - Vertretung (P-90004)

Create SUBSCRIBER generalversammlung: Jana Schäfer (P-90004)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "generalversammlung",
  "anchor.uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
  "holder.uuid" : "a35edbdf-d6fd-47b5-9f8b-a3a010efde41", // Person: Jana Schäfer
  "contact.uuid" : "84ba7e6c-d5fb-4ccc-8f97-eacbadce2d19" // Contact: Jana Schäfer - Vertretung (P-90004)
}
EOF
=> status: 201 CREATED 79e1fdca-419b-4205-beb2-8312c8411d34

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/79e1fdca-419b-4205-beb2-8312c8411d34" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "79e1fdca-419b-4205-beb2-8312c8411d34",
  "anchor" : {
    "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Schäfer Elektro GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "a35edbdf-d6fd-47b5-9f8b-a3a010efde41", // Person: Jana Schäfer
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Jana",
    "familyName" : "Schäfer"
  },
  "type" : "SUBSCRIBER",
  "mark" : "generalversammlung",
  "contact" : {
    "uuid" : "84ba7e6c-d5fb-4ccc-8f97-eacbadce2d19", // Contact: Jana Schäfer - Vertretung (P-90004)
    "caption" : "Jana Schäfer - Vertretung (P-90004)",
    "postalAddress" : {
      "zipcode" : "34117",
      "country" : "Germany",
      "city" : "Kassel",
      "street" : "Schulstraße 334"
    },
    "emailAddresses" : {
      "main" : "jana-schaefer@schaefer-elektro-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 176 04069020"
    }
  }
}

Contact: Jana Schäfer - private Mailinglisten-Adresse

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Jana Schäfer - private Mailinglisten-Adresse",
  "postalAddress" : {
    "street" : "Mühlenkamp 757",
    "zipcode" : "44135",
    "city" : "Dortmund",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "main" : "+49 172 9973186"
  },
  "emailAddresses" : {
    "main" : "jana-schaefer@example.net"
  }
}
EOF
=> status: 201 CREATED a61f1a2e-a19c-4ae5-a94c-cf065f76faab

UseCase Add Demo Subscription => SUBSCRIBER members-announce: Jana Schäfer (P-90004)

Properties

Given

name value
partnerPersonName Schäfer Elektro GmbH
mailingList members-announce
holderGivenName Jana
holderFamilyName Schäfer
contactCaption Jana Schäfer - private Mailinglisten-Adresse

Create SUBSCRIBER members-announce: Jana Schäfer (P-90004)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "members-announce",
  "anchor.uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
  "holder.uuid" : "a35edbdf-d6fd-47b5-9f8b-a3a010efde41", // Person: Jana Schäfer
  "contact.uuid" : "a61f1a2e-a19c-4ae5-a94c-cf065f76faab" // Contact: Jana Schäfer - private Mailinglisten-Adresse
}
EOF
=> status: 201 CREATED 0e0d4383-1d04-44fc-b3d0-9714bc441c28

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/0e0d4383-1d04-44fc-b3d0-9714bc441c28" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "0e0d4383-1d04-44fc-b3d0-9714bc441c28",
  "anchor" : {
    "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Schäfer Elektro GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "a35edbdf-d6fd-47b5-9f8b-a3a010efde41", // Person: Jana Schäfer
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Jana",
    "familyName" : "Schäfer"
  },
  "type" : "SUBSCRIBER",
  "mark" : "members-announce",
  "contact" : {
    "uuid" : "a61f1a2e-a19c-4ae5-a94c-cf065f76faab", // Contact: Jana Schäfer - private Mailinglisten-Adresse
    "caption" : "Jana Schäfer - private Mailinglisten-Adresse",
    "postalAddress" : {
      "zipcode" : "44135",
      "country" : "Germany",
      "city" : "Dortmund",
      "street" : "Mühlenkamp 757"
    },
    "emailAddresses" : {
      "main" : "jana-schaefer@example.net"
    },
    "phoneNumbers" : {
      "main" : "+49 172 9973186"
    }
  }
}

UseCase Add Demo Relation => OPERATIONS: Michael Fischer - Technik (P-90004)

Properties

Given

name value
partnerPersonName Schäfer Elektro GmbH
relationType OPERATIONS
holderGivenName Michael
holderFamilyName Fischer
contactCaption Michael Fischer - Technik (P-90004)
postalAddress “name”: “Buchhaltung”,
        “street”: “Schlehenweg 867”,
        “zipcode”: “33602”,
        “city”: “Bielefeld”,
        “country”: “Germany”
phoneNumber +49 176 04069045
emailAddress michael-fischer@schaefer-elektro-gmbh.example.org

Person: Michael Fischer

HTTP POST "/api/hs/office/persons" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Fischer",
  "givenName" : "Michael"
}
EOF
=> status: 201 CREATED 43d7f4b7-2201-4c26-9fd9-5f6950557fc6

Contact: Michael Fischer - Technik (P-90004)

HTTP POST "/api/hs/office/contacts" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "caption" : "Michael Fischer - Technik (P-90004)",
  "postalAddress" : {
    "name" : "Buchhaltung",
    "street" : "Schlehenweg 867",
    "zipcode" : "33602",
    "city" : "Bielefeld",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 176 04069045"
  },
  "emailAddresses" : {
    "main" : "michael-fischer@schaefer-elektro-gmbh.example.org"
  }
}
EOF
=> status: 201 CREATED a1e5a9a2-7bd8-485c-8ac4-b86a297a007e

Create OPERATIONS: Michael Fischer - Technik (P-90004)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "OPERATIONS",
  "anchor.uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
  "holder.uuid" : "43d7f4b7-2201-4c26-9fd9-5f6950557fc6", // Person: Michael Fischer
  "contact.uuid" : "a1e5a9a2-7bd8-485c-8ac4-b86a297a007e" // Contact: Michael Fischer - Technik (P-90004)
}
EOF
=> status: 201 CREATED 4f7bc0b3-dd7a-42db-b462-d599c2e77af4

Verify the Relation Got Created

HTTP GET "/api/hs/office/relations/4f7bc0b3-dd7a-42db-b462-d599c2e77af4" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "4f7bc0b3-dd7a-42db-b462-d599c2e77af4",
  "anchor" : {
    "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Schäfer Elektro GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "43d7f4b7-2201-4c26-9fd9-5f6950557fc6", // Person: Michael Fischer
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Michael",
    "familyName" : "Fischer"
  },
  "type" : "OPERATIONS",
  "mark" : null,
  "contact" : {
    "uuid" : "a1e5a9a2-7bd8-485c-8ac4-b86a297a007e", // Contact: Michael Fischer - Technik (P-90004)
    "caption" : "Michael Fischer - Technik (P-90004)",
    "postalAddress" : {
      "zipcode" : "33602",
      "country" : "Germany",
      "city" : "Bielefeld",
      "street" : "Schlehenweg 867",
      "name" : "Buchhaltung"
    },
    "emailAddresses" : {
      "main" : "michael-fischer@schaefer-elektro-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 176 04069045"
    }
  }
}

UseCase Add Demo Subscription => SUBSCRIBER operations-announce: Michael Fischer (P-90004)

Properties

Given

name value
partnerPersonName Schäfer Elektro GmbH
mailingList operations-announce
holderGivenName Michael
holderFamilyName Fischer
contactCaption Michael Fischer - Technik (P-90004)

Create SUBSCRIBER operations-announce: Michael Fischer (P-90004)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "operations-announce",
  "anchor.uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
  "holder.uuid" : "43d7f4b7-2201-4c26-9fd9-5f6950557fc6", // Person: Michael Fischer
  "contact.uuid" : "a1e5a9a2-7bd8-485c-8ac4-b86a297a007e" // Contact: Michael Fischer - Technik (P-90004)
}
EOF
=> status: 201 CREATED d6b7d537-c418-4665-b554-edfd86924872

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/d6b7d537-c418-4665-b554-edfd86924872" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "d6b7d537-c418-4665-b554-edfd86924872",
  "anchor" : {
    "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Schäfer Elektro GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "43d7f4b7-2201-4c26-9fd9-5f6950557fc6", // Person: Michael Fischer
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Michael",
    "familyName" : "Fischer"
  },
  "type" : "SUBSCRIBER",
  "mark" : "operations-announce",
  "contact" : {
    "uuid" : "a1e5a9a2-7bd8-485c-8ac4-b86a297a007e", // Contact: Michael Fischer - Technik (P-90004)
    "caption" : "Michael Fischer - Technik (P-90004)",
    "postalAddress" : {
      "zipcode" : "33602",
      "country" : "Germany",
      "city" : "Bielefeld",
      "street" : "Schlehenweg 867",
      "name" : "Buchhaltung"
    },
    "emailAddresses" : {
      "main" : "michael-fischer@schaefer-elektro-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 176 04069045"
    }
  }
}

UseCase Add Demo Subscription => SUBSCRIBER operations-discussion: Michael Fischer (P-90004)

Properties

Given

name value
partnerPersonName Schäfer Elektro GmbH
mailingList operations-discussion
holderGivenName Michael
holderFamilyName Fischer
contactCaption Michael Fischer - Technik (P-90004)

Create SUBSCRIBER operations-discussion: Michael Fischer (P-90004)

HTTP POST "/api/hs/office/relations" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY" \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "operations-discussion",
  "anchor.uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
  "holder.uuid" : "43d7f4b7-2201-4c26-9fd9-5f6950557fc6", // Person: Michael Fischer
  "contact.uuid" : "a1e5a9a2-7bd8-485c-8ac4-b86a297a007e" // Contact: Michael Fischer - Technik (P-90004)
}
EOF
=> status: 201 CREATED b3801dde-dc23-4c82-96cd-517556b4ad97

Verify the Subscription Got Created

HTTP GET "/api/hs/office/relations/b3801dde-dc23-4c82-96cd-517556b4ad97" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
{
  "uuid" : "b3801dde-dc23-4c82-96cd-517556b4ad97",
  "anchor" : {
    "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Schäfer Elektro GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "43d7f4b7-2201-4c26-9fd9-5f6950557fc6", // Person: Michael Fischer
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Michael",
    "familyName" : "Fischer"
  },
  "type" : "SUBSCRIBER",
  "mark" : "operations-discussion",
  "contact" : {
    "uuid" : "a1e5a9a2-7bd8-485c-8ac4-b86a297a007e", // Contact: Michael Fischer - Technik (P-90004)
    "caption" : "Michael Fischer - Technik (P-90004)",
    "postalAddress" : {
      "zipcode" : "33602",
      "country" : "Germany",
      "city" : "Bielefeld",
      "street" : "Schlehenweg 867",
      "name" : "Buchhaltung"
    },
    "emailAddresses" : {
      "main" : "michael-fischer@schaefer-elektro-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 176 04069045"
    }
  }
}

Query the most recently generated demo partner

HTTP GET "/api/hs/office/relations?relationType=PARTNER&contactData=Sch%C3%A4fer+Elektro+GmbH+-+Hauptkontakt+%28P-90004%29" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "4e8af615-1974-4774-92fd-b431315a09c8",
  "anchor" : {
    "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "0ec38379-84d2-4601-890d-97086a53add4", // Person: Schäfer Elektro GmbH
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Schäfer Elektro GmbH",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "ce887750-d574-4787-8b5c-6a2bdb410dd9", // Contact: Schäfer Elektro GmbH - Hauptkontakt (P-90004)
    "caption" : "Schäfer Elektro GmbH - Hauptkontakt (P-90004)",
    "postalAddress" : {
      "zipcode" : "44135",
      "country" : "Germany",
      "city" : "Dortmund",
      "street" : "Veilchenweg 528",
      "name" : "Buchhaltung"
    },
    "emailAddresses" : {
      "main" : "info@schaefer-elektro-gmbh.example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 176 04069082"
    }
  }
} ]

Verify the Showcase Cooperative Has Exactly One Membership

HTTP GET "/api/hs/office/memberships?partnerNumber=P-90000" \
  -H "Hostsharing-Api-Key: $HSADMINNG_API_KEY"
=> status: 200 OK 
[ {
  "uuid" : "6b3cd269-95cf-42bf-8371-3c4725fe38c5",
  "partner" : {
    "uuid" : "bcac06d7-d899-4628-a254-d6c2af47e64f", // Partner: P-90000
    "partnerNumber" : "P-90000",
    "partnerRel" : {
      "uuid" : "43a30219-55a6-4ebf-9f4b-03f112871878",
      "anchor" : {
        "uuid" : "1d707824-40cd-4f50-b7ac-96e311d8281c", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "c1cd904f-4807-4a4b-8b80-24b1af0c2cfe", // Person: Tannenhof Bürotechnik eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Tannenhof Bürotechnik eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "4e027986-5258-42bb-8776-b159ddc7d0f9", // Contact: Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)
        "caption" : "Tannenhof Bürotechnik eG - Hauptkontakt (P-90000)",
        "postalAddress" : {
          "zipcode" : "86150",
          "country" : "Germany",
          "city" : "Augsburg",
          "street" : "Am Anger 167"
        },
        "emailAddresses" : {
          "main" : "info@tannenhof-buerotechnik-eg.example.org"
        },
        "phoneNumbers" : {
          "office" : "+49 171 3920080"
        }
      }
    },
    "details" : {
      "uuid" : "7d553ca2-f947-4a3a-a6a7-4e885a4efaaa",
      "registrationOffice" : "Registergericht Augsburg",
      "registrationNumber" : "555465",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-9000000",
  "memberNumberSuffix" : "00",
  "validFrom" : "2011-05-13",
  "validTo" : null,
  "status" : "ACTIVE",
  "membershipFeeBillable" : true
} ]

generated on 2026-08-10 04:42:37 for branch HEAD